public class LimitedAgeMemoryCache extends Object implements MemoryCache
MemoryCache
. Provides special feature for cache: if some cached object age exceeds defined
value then this object will be removed from cache.MemoryCache
构造器和说明 |
---|
LimitedAgeMemoryCache(MemoryCache cache,
long maxAge) |
限定符和类型 | 方法和说明 |
---|---|
void |
clear()
Remove all items from cache
|
android.graphics.Bitmap |
get(String key)
Returns value by key.
|
Collection<String> |
keys()
Returns all keys of cache
|
boolean |
put(String key,
android.graphics.Bitmap value)
Puts value into cache by key
|
android.graphics.Bitmap |
remove(String key)
Removes item by key
|
public LimitedAgeMemoryCache(MemoryCache cache, long maxAge)
cache
- Wrapped memory cachemaxAge
- Max object age (in seconds). If object age will exceed this value then it'll be removed from
cache on next treatment (and therefore be reloaded).public boolean put(String key, android.graphics.Bitmap value)
MemoryCache
put
在接口中 MemoryCache
public android.graphics.Bitmap get(String key)
MemoryCache
get
在接口中 MemoryCache
public android.graphics.Bitmap remove(String key)
MemoryCache
remove
在接口中 MemoryCache
public Collection<String> keys()
MemoryCache
keys
在接口中 MemoryCache
public void clear()
MemoryCache
clear
在接口中 MemoryCache