public class UsingFreqLimitedMemoryCache extends LimitedMemoryCache
bitmap cache. Provides bitmaps storing. Size of all stored bitmaps will not to
exceed size limit. When cache reaches limit size then the bitmap which used the least frequently is deleted from
cache.| Constructor and Description |
|---|
UsingFreqLimitedMemoryCache(int sizeLimit) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Remove all items from cache
|
protected Reference<android.graphics.Bitmap> |
createReference(android.graphics.Bitmap value)
Creates not strong reference of value
|
android.graphics.Bitmap |
get(String key)
Returns value by key.
|
protected int |
getSize(android.graphics.Bitmap value) |
boolean |
put(String key,
android.graphics.Bitmap value)
Puts value into cache by key
|
android.graphics.Bitmap |
remove(String key)
Removes item by key
|
protected android.graphics.Bitmap |
removeNext() |
getSizeLimitkeyspublic boolean put(String key, android.graphics.Bitmap value)
MemoryCacheput in interface MemoryCacheput in class LimitedMemoryCachepublic android.graphics.Bitmap get(String key)
MemoryCacheget in interface MemoryCacheget in class BaseMemoryCachepublic android.graphics.Bitmap remove(String key)
MemoryCacheremove in interface MemoryCacheremove in class LimitedMemoryCachepublic void clear()
MemoryCacheclear in interface MemoryCacheclear in class LimitedMemoryCacheprotected int getSize(android.graphics.Bitmap value)
getSize in class LimitedMemoryCacheprotected android.graphics.Bitmap removeNext()
removeNext in class LimitedMemoryCacheprotected Reference<android.graphics.Bitmap> createReference(android.graphics.Bitmap value)
BaseMemoryCachecreateReference in class BaseMemoryCacheCopyright © 2011-2015. All Rights Reserved.