|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.nostra13.universalimageloader.cache.memory.BaseMemoryCache
com.nostra13.universalimageloader.cache.memory.LimitedMemoryCache
com.nostra13.universalimageloader.cache.memory.impl.UsingFreqLimitedMemoryCache
public class UsingFreqLimitedMemoryCache
Limited 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.
NOTE: This cache uses strong and weak references for stored Bitmaps. Strong references - for limited count of
Bitmaps (depends on cache size), weak references - for all other cached Bitmaps.
Constructor Summary | |
---|---|
UsingFreqLimitedMemoryCache(int sizeLimit)
|
Method Summary | |
---|---|
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()
|
Methods inherited from class com.nostra13.universalimageloader.cache.memory.LimitedMemoryCache |
---|
getSizeLimit |
Methods inherited from class com.nostra13.universalimageloader.cache.memory.BaseMemoryCache |
---|
keys |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UsingFreqLimitedMemoryCache(int sizeLimit)
Method Detail |
---|
public boolean put(String key, android.graphics.Bitmap value)
MemoryCacheAware
put
in interface MemoryCacheAware<String,android.graphics.Bitmap>
put
in class LimitedMemoryCache
public android.graphics.Bitmap get(String key)
MemoryCacheAware
get
in interface MemoryCacheAware<String,android.graphics.Bitmap>
get
in class BaseMemoryCache
public android.graphics.Bitmap remove(String key)
MemoryCacheAware
remove
in interface MemoryCacheAware<String,android.graphics.Bitmap>
remove
in class LimitedMemoryCache
public void clear()
MemoryCacheAware
clear
in interface MemoryCacheAware<String,android.graphics.Bitmap>
clear
in class LimitedMemoryCache
protected int getSize(android.graphics.Bitmap value)
getSize
in class LimitedMemoryCache
protected android.graphics.Bitmap removeNext()
removeNext
in class LimitedMemoryCache
protected Reference<android.graphics.Bitmap> createReference(android.graphics.Bitmap value)
BaseMemoryCache
createReference
in class BaseMemoryCache
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |