|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.nostra13.universalimageloader.cache.memory.BaseMemoryCache<K,V>
com.nostra13.universalimageloader.cache.memory.LimitedMemoryCache<String,android.graphics.Bitmap>
com.nostra13.universalimageloader.cache.memory.impl.LRULimitedMemoryCache
public class LRULimitedMemoryCache
Limited bitmap cache. Provides bitmaps storing. Size of all stored bitmaps will not to
exceed size limit. When cache reaches limit size then the least recently used bitmap 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 | |
|---|---|
LRULimitedMemoryCache(int maxSize)
|
|
| 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 |
void |
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 LRULimitedMemoryCache(int maxSize)
maxSize - Maximum sum of the sizes of the Bitmaps in this cache| Method Detail |
|---|
public boolean put(String key,
android.graphics.Bitmap value)
MemoryCacheAware
put in interface MemoryCacheAware<String,android.graphics.Bitmap>put in class LimitedMemoryCache<String,android.graphics.Bitmap>public android.graphics.Bitmap get(String key)
MemoryCacheAware
get in interface MemoryCacheAware<String,android.graphics.Bitmap>get in class BaseMemoryCache<String,android.graphics.Bitmap>public void remove(String key)
MemoryCacheAware
remove in interface MemoryCacheAware<String,android.graphics.Bitmap>remove in class LimitedMemoryCache<String,android.graphics.Bitmap>public void clear()
MemoryCacheAware
clear in interface MemoryCacheAware<String,android.graphics.Bitmap>clear in class LimitedMemoryCache<String,android.graphics.Bitmap>protected int getSize(android.graphics.Bitmap value)
getSize in class LimitedMemoryCache<String,android.graphics.Bitmap>protected android.graphics.Bitmap removeNext()
removeNext in class LimitedMemoryCache<String,android.graphics.Bitmap>protected Reference<android.graphics.Bitmap> createReference(android.graphics.Bitmap value)
BaseMemoryCache
createReference in class BaseMemoryCache<String,android.graphics.Bitmap>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||