-
- All Implemented Interfaces:
-
org.readium.r2.shared.util.MemoryObserver,org.readium.r2.shared.util.SuspendingCloseable
public interface Cache<V extends Object> implements SuspendingCloseable, MemoryObserver
A generic cache for objects of type V.
It implements MemoryObserver to flush unused in-memory objects when necessary.
-
-
Method Summary
Modifier and Type Method Description abstract <T extends Any> Ttransaction(SuspendFunction1<CacheTransaction<V>, T> block)Performs an atomic block transaction on this cache. -
-
Method Detail
-
transaction
abstract <T extends Any> T transaction(SuspendFunction1<CacheTransaction<V>, T> block)
Performs an atomic block transaction on this cache.
-
-
-
-