public static class WriterCacheManager.Default extends WriterCacheManager
WriterCacheManager returns
RecordCache instances for the string and template cache
and NodeCache instance for the node cache.WriterCacheManager.Default, WriterCacheManager.EmptyDEFAULT_NODE_CACHE_SIZE, DEFAULT_STRING_CACHE_SIZE, DEFAULT_TEMPLATE_CACHE_SIZE| Constructor and Description |
|---|
Default()
New instance using the default factories
RecordCache.factory(int)
and PriorityCache.factory(int) with the sizes
WriterCacheManager.DEFAULT_STRING_CACHE_SIZE, WriterCacheManager.DEFAULT_TEMPLATE_CACHE_SIZE
and WriterCacheManager.DEFAULT_NODE_CACHE_SIZE. |
Default(com.google.common.base.Supplier<RecordCache<String>> stringCacheFactory,
com.google.common.base.Supplier<RecordCache<Template>> templateCacheFactory,
com.google.common.base.Supplier<PriorityCache<String,RecordId>> nodeCacheFactory)
New instance using the passed factories for creating cache instances.
|
| Modifier and Type | Method and Description |
|---|---|
static <T> com.google.common.base.Supplier<Long> |
accumulateRecordCacheSizes(Iterable<RecordCache<T>> caches) |
static <T> com.google.common.base.Supplier<Long> |
accumulateRecordCacheWeights(Iterable<RecordCache<T>> caches) |
protected void |
evictCaches(com.google.common.base.Predicate<Integer> generations)
Remove all cache generations matching the passed
generations predicate. |
NodeCache |
getNodeCache(int generation) |
String |
getNodeCacheOccupancyInfo()
Get occupancy information for the node deduplication cache indicating occupancy and
evictions per priority.
|
org.apache.jackrabbit.oak.api.jmx.CacheStatsMBean |
getNodeCacheStats() |
RecordCache<String> |
getStringCache(int generation) |
org.apache.jackrabbit.oak.api.jmx.CacheStatsMBean |
getStringCacheStats() |
RecordCache<Template> |
getTemplateCache(int generation) |
org.apache.jackrabbit.oak.api.jmx.CacheStatsMBean |
getTemplateCacheStats() |
public Default(@Nonnull com.google.common.base.Supplier<RecordCache<String>> stringCacheFactory, @Nonnull com.google.common.base.Supplier<RecordCache<Template>> templateCacheFactory, @Nonnull com.google.common.base.Supplier<PriorityCache<String,RecordId>> nodeCacheFactory)
stringCacheFactory - factory for the string cachetemplateCacheFactory - factory for the template cachenodeCacheFactory - factory for the node cachepublic Default()
RecordCache.factory(int)
and PriorityCache.factory(int) with the sizes
WriterCacheManager.DEFAULT_STRING_CACHE_SIZE, WriterCacheManager.DEFAULT_TEMPLATE_CACHE_SIZE
and WriterCacheManager.DEFAULT_NODE_CACHE_SIZE.@Nonnull public RecordCache<String> getStringCache(int generation)
getStringCache in class WriterCacheManagergeneration.@Nonnull public RecordCache<Template> getTemplateCache(int generation)
getTemplateCache in class WriterCacheManagergeneration.@Nonnull public NodeCache getNodeCache(int generation)
getNodeCache in class WriterCacheManagergeneration.@CheckForNull public org.apache.jackrabbit.oak.api.jmx.CacheStatsMBean getStringCacheStats()
getStringCacheStats in class WriterCacheManagernull if not available.@CheckForNull public org.apache.jackrabbit.oak.api.jmx.CacheStatsMBean getTemplateCacheStats()
getTemplateCacheStats in class WriterCacheManagernull if not available.@Nonnull public static <T> com.google.common.base.Supplier<Long> accumulateRecordCacheSizes(Iterable<RecordCache<T>> caches)
@Nonnull public static <T> com.google.common.base.Supplier<Long> accumulateRecordCacheWeights(Iterable<RecordCache<T>> caches)
@CheckForNull public org.apache.jackrabbit.oak.api.jmx.CacheStatsMBean getNodeCacheStats()
getNodeCacheStats in class WriterCacheManagernull if not available.public String getNodeCacheOccupancyInfo()
WriterCacheManagergetNodeCacheOccupancyInfo in class WriterCacheManagerprotected final void evictCaches(com.google.common.base.Predicate<Integer> generations)
generations predicate.generations - Copyright © 2012-2017 The Apache Software Foundation. All Rights Reserved.