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)
MemoryCacheput 在接口中 MemoryCachepublic android.graphics.Bitmap get(String key)
MemoryCacheget 在接口中 MemoryCachepublic android.graphics.Bitmap remove(String key)
MemoryCacheremove 在接口中 MemoryCachepublic Collection<String> keys()
MemoryCachekeys 在接口中 MemoryCachepublic void clear()
MemoryCacheclear 在接口中 MemoryCache