-
public interface MemoryCacheAn LRU cache of Bitmaps.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classMemoryCache.KeyThe cache key for a Bitmap in the memory cache.
public final classMemoryCache.ValueThe value for a Bitmap in the memory cache.
public final classMemoryCache.Builder
-
Method Summary
Modifier and Type Method Description abstract MemoryCache.Valueget(MemoryCache.Key key)Get the Value associated with key. abstract Unitset(MemoryCache.Key key, MemoryCache.Value value)Set the Value associated with key. abstract Booleanremove(MemoryCache.Key key)Remove the Value referenced by key. abstract Unitclear()Remove all values from the memory cache. abstract UnittrimMemory(Integer level)abstract IntegergetSize()The current size of the cache in bytes. abstract IntegergetMaxSize()The maximum size of the cache in bytes. abstract Set<MemoryCache.Key>getKeys()The keys present in the cache. -
-
Method Detail
-
get
abstract MemoryCache.Value get(MemoryCache.Key key)
-
set
abstract Unit set(MemoryCache.Key key, MemoryCache.Value value)
-
remove
abstract Boolean remove(MemoryCache.Key key)
-
trimMemory
abstract Unit trimMemory(Integer level)
-
getMaxSize
abstract Integer getMaxSize()
The maximum size of the cache in bytes.
-
getKeys
abstract Set<MemoryCache.Key> getKeys()
The keys present in the cache.
-
-
-
-