Package 

Interface Cache

  • 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> T transaction(SuspendFunction1<CacheTransaction<V>, T> block) Performs an atomic block transaction on this cache.
      • Methods inherited from class org.readium.r2.shared.util.cache.Cache

        close, onTrimMemory
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait