Class CompositeDataStoreCache

  • All Implemented Interfaces:
    Cache<java.lang.String,​java.io.File>, java.io.Closeable, java.lang.AutoCloseable

    public class CompositeDataStoreCache
    extends AbstractCache<java.lang.String,​java.io.File>
    implements java.io.Closeable
    • Constructor Detail

      • CompositeDataStoreCache

        public CompositeDataStoreCache​(java.lang.String path,
                                       java.io.File home,
                                       long size,
                                       int uploadSplitPercentage,
                                       int uploadThreads,
                                       CacheLoader<java.lang.String,​java.io.InputStream> loader,
                                       org.apache.jackrabbit.oak.plugins.blob.StagingUploader uploader,
                                       StatisticsProvider statsProvider,
                                       ListeningExecutorService listeningExecutor,
                                       java.util.concurrent.ScheduledExecutorService scheduledExecutor,
                                       java.util.concurrent.ExecutorService executor,
                                       int purgeInterval,
                                       int stagingRetryInterval)
    • Method Detail

      • getIfPresent

        @Nullable
        public @Nullable java.io.File getIfPresent​(java.lang.String key)
      • getIfPresent

        @Nullable
        public @Nullable java.io.File getIfPresent​(java.lang.Object key)
        Description copied from interface: Cache
        Returns the value associated with key in this cache, or null if there is no cached value for key.
        Specified by:
        getIfPresent in interface Cache<java.lang.String,​java.io.File>
      • get

        public java.io.File get​(java.lang.String key)
                         throws java.io.IOException
        Throws:
        java.io.IOException
      • invalidate

        public void invalidate​(java.lang.Object key)
        Description copied from interface: Cache
        Discards any cached value for key key.
        Specified by:
        invalidate in interface Cache<java.lang.String,​java.io.File>
        Overrides:
        invalidate in class AbstractCache<java.lang.String,​java.io.File>
      • stage

        public boolean stage​(java.lang.String key,
                             java.io.File file)
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable