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| Constructor and Description |
|---|
LimitedAgeMemoryCache(MemoryCache cache,
long maxAge) |
| Modifier and Type | Method and Description |
|---|---|
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 in interface MemoryCachepublic android.graphics.Bitmap get(String key)
MemoryCacheget in interface MemoryCachepublic android.graphics.Bitmap remove(String key)
MemoryCacheremove in interface MemoryCachepublic Collection<String> keys()
MemoryCachekeys in interface MemoryCachepublic void clear()
MemoryCacheclear in interface MemoryCacheCopyright © 2011-2015. All Rights Reserved.