public abstract class WriterCacheManager extends Object
SegmentWriter
to avoid writing multiple copies
of the same record. The caches are striped into generations
with one generation per gc cycle. This avoids records old
generations being reused.Modifier and Type | Class and Description |
---|---|
static class |
WriterCacheManager.Default
This implementation of
WriterCacheManager returns
RecordCache instances for the string and template cache
and NodeCache instance for the node cache. |
static class |
WriterCacheManager.Empty
This implementation of
WriterCacheManager returns empty caches
of size 0. |
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_NODE_CACHE_SIZE
Default size of the node deduplication cache.
|
static int |
DEFAULT_STRING_CACHE_SIZE
Default size of the string cache.
|
static int |
DEFAULT_TEMPLATE_CACHE_SIZE
Default size of the template cache.
|
Constructor and Description |
---|
WriterCacheManager() |
Modifier and Type | Method and Description |
---|---|
abstract 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() |
abstract RecordCache<String> |
getStringCache(int generation) |
org.apache.jackrabbit.oak.api.jmx.CacheStatsMBean |
getStringCacheStats() |
abstract RecordCache<Template> |
getTemplateCache(int generation) |
org.apache.jackrabbit.oak.api.jmx.CacheStatsMBean |
getTemplateCacheStats() |
public static final int DEFAULT_STRING_CACHE_SIZE
getStringCache(int)
public static final int DEFAULT_TEMPLATE_CACHE_SIZE
getTemplateCache(int)
public static final int DEFAULT_NODE_CACHE_SIZE
getNodeCache(int)
@Nonnull public abstract RecordCache<String> getStringCache(int generation)
generation
- generation
.@Nonnull public abstract RecordCache<Template> getTemplateCache(int generation)
generation
- generation
.@Nonnull public abstract NodeCache getNodeCache(int generation)
generation
- generation
.@CheckForNull public org.apache.jackrabbit.oak.api.jmx.CacheStatsMBean getStringCacheStats()
null
if not available.@CheckForNull public org.apache.jackrabbit.oak.api.jmx.CacheStatsMBean getTemplateCacheStats()
null
if not available.@CheckForNull public org.apache.jackrabbit.oak.api.jmx.CacheStatsMBean getNodeCacheStats()
null
if not available.@CheckForNull public String getNodeCacheOccupancyInfo()
Copyright © 2012-2016 The Apache Software Foundation. All Rights Reserved.