Package 

Class InMemoryCacheService

  • All Implemented Interfaces:
    org.readium.r2.shared.publication.Publication.Service , org.readium.r2.shared.publication.services.CacheService , org.readium.r2.shared.util.Closeable , org.readium.r2.shared.util.MemoryObserver

    
    public final class InMemoryCacheService
     implements CacheService, MemoryObserver
                        

    A basic CacheService implementation keeping the cached objects in memory.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private final List<Link> links
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      <T extends Any> Cache<T> cacheOf(KClass<T> valueType, String namespace) Gets the cache for objects of valueType in the given namespace.
      Unit close() Closes any opened file handles, removes temporary files, etc.
      Unit onTrimMemory(MemoryObserver.Level level) Called by the system when memory needs to be freed.
      • Methods inherited from class org.readium.r2.shared.publication.Publication.Service

        get, getLinks
      • Methods inherited from class java.lang.Object

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