Class CompositeDataStoreCache
- java.lang.Object
-
- com.google.common.cache.AbstractCache<String,File>
-
- org.apache.jackrabbit.oak.plugins.blob.CompositeDataStoreCache
-
- All Implemented Interfaces:
Cache<String,File>,Closeable,AutoCloseable
public class CompositeDataStoreCache extends AbstractCache<String,File> implements 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(String path, File home, long size, int uploadSplitPercentage, int uploadThreads, CacheLoader<String,InputStream> loader, org.apache.jackrabbit.oak.plugins.blob.StagingUploader uploader, StatisticsProvider statsProvider, ListeningExecutorService listeningExecutor, ScheduledExecutorService scheduledExecutor, ExecutorService executor, int purgeInterval, int stagingRetryInterval)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Fileget(String key)DataStoreCacheStatsMBeangetCacheStats()@Nullable FilegetIfPresent(Object key)Returns the value associated withkeyin this cache, ornullif there is no cached value forkey.@Nullable FilegetIfPresent(String key)DataStoreCacheStatsMBeangetStagingCacheStats()voidinvalidate(Object key)Discards any cached value for keykey.booleanstage(String key, 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(String path, File home, long size, int uploadSplitPercentage, int uploadThreads, CacheLoader<String,InputStream> loader, org.apache.jackrabbit.oak.plugins.blob.StagingUploader uploader, StatisticsProvider statsProvider, ListeningExecutorService listeningExecutor, ScheduledExecutorService scheduledExecutor, ExecutorService executor, int purgeInterval, int stagingRetryInterval)
-
-
Method Detail
-
getIfPresent
@Nullable public @Nullable File getIfPresent(Object key)
Description copied from interface:CacheReturns the value associated withkeyin this cache, ornullif there is no cached value forkey.- Specified by:
getIfPresentin interfaceCache<String,File>
-
get
public File get(String key) throws IOException
- Throws:
IOException
-
invalidate
public void invalidate(Object key)
Description copied from interface:CacheDiscards any cached value for keykey.- Specified by:
invalidatein interfaceCache<String,File>- Overrides:
invalidatein classAbstractCache<String,File>
-
getStagingCacheStats
public DataStoreCacheStatsMBean getStagingCacheStats()
-
getCacheStats
public DataStoreCacheStatsMBean getCacheStats()
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
-