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 void
close()
File
get(String key)
DataStoreCacheStatsMBean
getCacheStats()
@Nullable File
getIfPresent(Object key)
Returns the value associated withkey
in this cache, ornull
if there is no cached value forkey
.@Nullable File
getIfPresent(String key)
DataStoreCacheStatsMBean
getStagingCacheStats()
void
invalidate(Object key)
Discards any cached value for keykey
.boolean
stage(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:Cache
Returns the value associated withkey
in this cache, ornull
if there is no cached value forkey
.- Specified by:
getIfPresent
in interfaceCache<String,File>
-
get
public File get(String key) throws IOException
- Throws:
IOException
-
invalidate
public void invalidate(Object key)
Description copied from interface:Cache
Discards any cached value for keykey
.- Specified by:
invalidate
in interfaceCache<String,File>
- Overrides:
invalidate
in classAbstractCache<String,File>
-
getStagingCacheStats
public DataStoreCacheStatsMBean getStagingCacheStats()
-
getCacheStats
public DataStoreCacheStatsMBean getCacheStats()
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
-