Package org.nuxeo.ecm.core.cache
Class CacheMetrics
- java.lang.Object
- 
- org.nuxeo.ecm.core.cache.CacheWrapper
- 
- org.nuxeo.ecm.core.cache.CacheMetrics
 
 
- 
- All Implemented Interfaces:
- Cache,- CacheManagement
 
 public class CacheMetrics extends CacheWrapper 
- 
- 
Field SummaryFields Modifier and Type Field Description protected io.dropwizard.metrics5.MetricNameINVALIDATE_ALL_NAMEprotected io.dropwizard.metrics5.Counterinvalidationprotected io.dropwizard.metrics5.Counterreadprotected io.dropwizard.metrics5.Counterread_hitprotected io.dropwizard.metrics5.MetricNameREAD_HIT_NAMEprotected io.dropwizard.metrics5.RatioGaugeread_hit_ratioprotected io.dropwizard.metrics5.MetricNameREAD_HIT_RATIO_NAMEprotected io.dropwizard.metrics5.Counterread_missprotected io.dropwizard.metrics5.MetricNameREAD_MISS_NAMEprotected io.dropwizard.metrics5.MetricNameREAD_NAMEprotected io.dropwizard.metrics5.MetricRegistryregistryprotected io.dropwizard.metrics5.Gauge<Long>sizeprotected io.dropwizard.metrics5.MetricNameSIZE_NAMEprotected io.dropwizard.metrics5.Counterwriteprotected io.dropwizard.metrics5.MetricNameWRITE_NAME- 
Fields inherited from class org.nuxeo.ecm.core.cache.CacheWrappercache
 
- 
 - 
Constructor SummaryConstructors Constructor Description CacheMetrics(CacheManagement cache)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description Serializableget(String key)Get method to retrieve value from cache Must not raise exception if the key is null, but return nullvoidinvalidateAll()Invalidate all key-value stored in the cacheprotected io.dropwizard.metrics5.MetricNamenameOf(String name)voidput(String key, Serializable value)Put method to store aSerializablevaluevoidstart()Starts this cache.voidstop()Stops this cache and releases related resources.- 
Methods inherited from class org.nuxeo.ecm.core.cache.CacheWrappergetName, getSize, hasEntry, invalidate, invalidateLocal, invalidateLocalAll, keySet, putLocal, toString
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface org.nuxeo.ecm.core.cache.CachecomputeIfAbsent
 
- 
 
- 
- 
- 
Field Detail- 
registryprotected io.dropwizard.metrics5.MetricRegistry registry 
 - 
readprotected io.dropwizard.metrics5.Counter read 
 - 
read_hitprotected io.dropwizard.metrics5.Counter read_hit 
 - 
read_missprotected io.dropwizard.metrics5.Counter read_miss 
 - 
read_hit_ratioprotected io.dropwizard.metrics5.RatioGauge read_hit_ratio 
 - 
writeprotected io.dropwizard.metrics5.Counter write 
 - 
invalidationprotected io.dropwizard.metrics5.Counter invalidation 
 - 
sizeprotected io.dropwizard.metrics5.Gauge<Long> size 
 - 
READ_HIT_NAMEprotected final io.dropwizard.metrics5.MetricName READ_HIT_NAME 
 - 
READ_HIT_RATIO_NAMEprotected final io.dropwizard.metrics5.MetricName READ_HIT_RATIO_NAME 
 - 
READ_MISS_NAMEprotected final io.dropwizard.metrics5.MetricName READ_MISS_NAME 
 - 
READ_NAMEprotected final io.dropwizard.metrics5.MetricName READ_NAME 
 - 
WRITE_NAMEprotected final io.dropwizard.metrics5.MetricName WRITE_NAME 
 - 
INVALIDATE_ALL_NAMEprotected final io.dropwizard.metrics5.MetricName INVALIDATE_ALL_NAME 
 - 
SIZE_NAMEprotected final io.dropwizard.metrics5.MetricName SIZE_NAME 
 
- 
 - 
Constructor Detail- 
CacheMetricspublic CacheMetrics(CacheManagement cache) 
 
- 
 - 
Method Detail- 
nameOfprotected io.dropwizard.metrics5.MetricName nameOf(String name) 
 - 
startpublic void start() Description copied from interface:CacheManagementStarts this cache.- Specified by:
- startin interface- CacheManagement
- Overrides:
- startin class- CacheWrapper
 
 - 
stoppublic void stop() Description copied from interface:CacheManagementStops this cache and releases related resources.- Specified by:
- stopin interface- CacheManagement
- Overrides:
- stopin class- CacheWrapper
 
 - 
getpublic Serializable get(String key) Description copied from interface:CacheGet method to retrieve value from cache Must not raise exception if the key is null, but return null- Specified by:
- getin interface- Cache
- Overrides:
- getin class- CacheWrapper
- Parameters:
- key- the string key
- Returns:
- the Serializablevalue, return null if the key does not exist or if the key is null
 
 - 
putpublic void put(String key, Serializable value) Description copied from interface:CachePut method to store aSerializablevalue- Specified by:
- putin interface- Cache
- Overrides:
- putin class- CacheWrapper
- Parameters:
- key- the string key, if null, the value will not be stored
- value- the value to store, if null, the value will not be stored
 
 - 
invalidateAllpublic void invalidateAll() Description copied from interface:CacheInvalidate all key-value stored in the cache- Specified by:
- invalidateAllin interface- Cache
- Overrides:
- invalidateAllin class- CacheWrapper
 
 
- 
 
-