Class CompositeDataStoreCache
- java.lang.Object
-
- com.google.common.cache.AbstractCache<java.lang.String,java.io.File>
-
- org.apache.jackrabbit.oak.plugins.blob.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
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.common.cache.AbstractCache
AbstractCache.SimpleStatsCounter, AbstractCache.StatsCounter
-
-
Constructor Summary
Constructors Constructor Description 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 Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()java.io.Fileget(java.lang.String key)DataStoreCacheStatsMBeangetCacheStats()@Nullable java.io.FilegetIfPresent(java.lang.Object key)Returns the value associated withkeyin this cache, ornullif there is no cached value forkey.@Nullable java.io.FilegetIfPresent(java.lang.String key)DataStoreCacheStatsMBeangetStagingCacheStats()voidinvalidate(java.lang.Object key)Discards any cached value for keykey.booleanstage(java.lang.String key, java.io.File file)-
Methods inherited from class com.google.common.cache.AbstractCache
asMap, cleanUp, get, getAllPresent, invalidateAll, invalidateAll, put, putAll, size, stats
-
-
-
-
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:CacheReturns the value associated withkeyin this cache, ornullif there is no cached value forkey.- Specified by:
getIfPresentin interfaceCache<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:CacheDiscards any cached value for keykey.- Specified by:
invalidatein interfaceCache<java.lang.String,java.io.File>- Overrides:
invalidatein classAbstractCache<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:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable
-
-