public interface

CountingMemoryCache

implements MemoryTrimmable MemoryCache<K, V>
com.facebook.imagepipeline.cache.CountingMemoryCache<K, V>
Known Indirect Subclasses

Summary

Nested Classes
class CountingMemoryCache.Entry<K, V> The internal representation of a key-value pair stored by the cache. 
interface CountingMemoryCache.EntryStateObserver<K> Interface used to observe the state changes of an entry. 
Public Methods
abstract CloseableReference<V> cache(K key, CloseableReference<V> valueRef, EntryStateObserver<K> observer)
abstract void clear()
Removes all the items from the cache.
abstract CountingLruMap<K, Entry<K, V>> getCachedEntries()
abstract int getEvictionQueueCount()
Gets the total size in bytes of the cached items that are used by at least one client.
abstract int getEvictionQueueSizeInBytes()
Gets the total size in bytes of the exclusively owned items.
abstract int getInUseSizeInBytes()
Gets the total size in bytes of the cached items that are used by at least one client.
abstract MemoryCacheParams getMemoryCacheParams()
abstract Map<Bitmap, Object> getOtherEntries()
abstract void maybeEvictEntries()
Removes the exclusively owned items until the cache constraints are met.
abstract CloseableReference<V> reuse(K key)
[Expand]
Inherited Methods
From interface com.facebook.cache.common.HasDebugData
From interface com.facebook.common.memory.MemoryTrimmable
From interface com.facebook.imagepipeline.cache.MemoryCache

Public Methods

public abstract CloseableReference<V> cache (K key, CloseableReference<V> valueRef, EntryStateObserver<K> observer)

public abstract void clear ()

Removes all the items from the cache.

public abstract CountingLruMap<K, Entry<K, V>> getCachedEntries ()

public abstract int getEvictionQueueCount ()

Gets the total size in bytes of the cached items that are used by at least one client.

public abstract int getEvictionQueueSizeInBytes ()

Gets the total size in bytes of the exclusively owned items.

public abstract int getInUseSizeInBytes ()

Gets the total size in bytes of the cached items that are used by at least one client.

public abstract MemoryCacheParams getMemoryCacheParams ()

public abstract Map<Bitmap, Object> getOtherEntries ()

public abstract void maybeEvictEntries ()

Removes the exclusively owned items until the cache constraints are met.

This method invokes the external close() method, so it must not be called while holding the this lock.

public abstract CloseableReference<V> reuse (K key)