Back to Fresco

CountingMemoryCache

docs/javadoc/reference/com/facebook/imagepipeline/cache/CountingMemoryCache.html

3.6.020.9 KB
Original Source

Fresco

|

|

Packages | Classes

Interfaces

Classes

Packages | Classes

Summary: Nested Classes | Methods | Inherited Methods | [Expand All]

public interface

CountingMemoryCache

implements MemoryTrimmableMemoryCache<K, V>

| com.facebook.imagepipeline.cache.CountingMemoryCache<K, V> |

| Known Indirect Subclasses

AbstractAdaptiveCountingMemoryCache<K, V>, LruCountingMemoryCache<K, V>

| AbstractAdaptiveCountingMemoryCache<K, V> | Layer of memory cache stack responsible for managing eviction of the the cached items. | | LruCountingMemoryCache<K, V> | Layer of memory cache stack responsible for managing eviction of the the cached items. |

|

Summary

Nested Classes
class
interface
Public Methods
abstract CloseableReference<V>
abstract void
Removes all the items from the cache.
abstract CountingLruMap<K, Entry<K, V>>
abstract int
Gets the total size in bytes of the cached items that are used by at least one client.
abstract int
Gets the total size in bytes of the exclusively owned items.
abstract int
Gets the total size in bytes of the cached items that are used by at least one client.
abstract MemoryCacheParams
abstract Map<Bitmap, Object>
abstract void
Removes the exclusively owned items until the cache constraints are met.
abstract CloseableReference<V>

| [Expand] Inherited Methods | | --- | | From interface com.facebook.cache.common.HasDebugData

| abstract String | getDebugData() Return a string describing this object and to be used for debugging or logging |

| | From interface com.facebook.common.memory.MemoryTrimmable

| abstract void | trim(MemoryTrimType trimType) Trim memory. |

| | From interface com.facebook.imagepipeline.cache.MemoryCache

| abstract CloseableReference<V> | cache(K key, CloseableReference<V> value) Caches the the given key-value pair. | | abstract boolean | contains(K key) Check if the cache contains an item for the given key. | | abstract boolean | contains(Predicate<K> predicate) Find if any of the items from the cache whose keys match the specified predicate. | | abstract CloseableReference<V> | get(K key) Gets the item with the given key, or null if there is no such item. | | abstract int | getCount() Gets the total number of all currently cached items. | | abstract int | getSizeInBytes() Gets the total size in bytes of all currently cached items. | | abstract void | probe(K key) Probes whether the object corresponding to the key is in the cache. | | abstract int | removeAll(Predicate<K> predicate) Removes all the items from the cache whose keys match the specified predicate. |

|

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)

+Generated by Doclava. +