Class CompositeDataStoreCache
- java.lang.Object
-
- org.apache.jackrabbit.guava.common.cache.AbstractCache<java.lang.String,java.io.File>
-
- org.apache.jackrabbit.oak.plugins.blob.CompositeDataStoreCache
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,org.apache.jackrabbit.guava.common.cache.Cache<java.lang.String,java.io.File>
public class CompositeDataStoreCache extends org.apache.jackrabbit.guava.common.cache.AbstractCache<java.lang.String,java.io.File> implements java.io.Closeable
-
-
Constructor Summary
Constructors Constructor Description CompositeDataStoreCache(java.lang.String path, java.io.File home, long size, int uploadSplitPercentage, int uploadThreads, org.apache.jackrabbit.guava.common.cache.CacheLoader<java.lang.String,java.io.InputStream> loader, org.apache.jackrabbit.oak.plugins.blob.StagingUploader uploader, StatisticsProvider statsProvider, org.apache.jackrabbit.guava.common.util.concurrent.ListeningExecutorService listeningExecutor, java.util.concurrent.ScheduledExecutorService scheduledExecutor, java.util.concurrent.ExecutorService executor, int purgeInterval, int stagingRetryInterval)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
java.io.File
get(java.lang.String key)
DataStoreCacheStatsMBean
getCacheStats()
@Nullable java.io.File
getIfPresent(java.lang.Object key)
@Nullable java.io.File
getIfPresent(java.lang.String key)
DataStoreCacheStatsMBean
getStagingCacheStats()
void
invalidate(java.lang.Object key)
boolean
stage(java.lang.String key, java.io.File file)
-
-
-
Constructor Detail
-
CompositeDataStoreCache
public CompositeDataStoreCache(java.lang.String path, java.io.File home, long size, int uploadSplitPercentage, int uploadThreads, org.apache.jackrabbit.guava.common.cache.CacheLoader<java.lang.String,java.io.InputStream> loader, org.apache.jackrabbit.oak.plugins.blob.StagingUploader uploader, StatisticsProvider statsProvider, org.apache.jackrabbit.guava.common.util.concurrent.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)
- Specified by:
getIfPresent
in interfaceorg.apache.jackrabbit.guava.common.cache.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)
- Specified by:
invalidate
in interfaceorg.apache.jackrabbit.guava.common.cache.Cache<java.lang.String,java.io.File>
- Overrides:
invalidate
in classorg.apache.jackrabbit.guava.common.cache.AbstractCache<java.lang.String,java.io.File>
-
stage
public boolean stage(java.lang.String key, java.io.File file)
-
getStagingCacheStats
public DataStoreCacheStatsMBean getStagingCacheStats()
-
getCacheStats
public DataStoreCacheStatsMBean getCacheStats()
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
-
-