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
-
Field Summary
Modifier and TypeFieldDescriptionprotected final io.dropwizard.metrics5.MetricName
protected io.dropwizard.metrics5.Counter
protected io.dropwizard.metrics5.Counter
protected io.dropwizard.metrics5.Counter
protected final io.dropwizard.metrics5.MetricName
protected io.dropwizard.metrics5.RatioGauge
protected final io.dropwizard.metrics5.MetricName
protected io.dropwizard.metrics5.Counter
protected final io.dropwizard.metrics5.MetricName
protected final io.dropwizard.metrics5.MetricName
protected io.dropwizard.metrics5.MetricRegistry
protected io.dropwizard.metrics5.Gauge<Long>
protected final io.dropwizard.metrics5.MetricName
protected io.dropwizard.metrics5.Counter
protected final io.dropwizard.metrics5.MetricName
Fields inherited from class org.nuxeo.ecm.core.cache.CacheWrapper
cache
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet method to retrieve value from cache Must not raise exception if the key is null, but return nullvoid
Invalidate all key-value stored in the cacheprotected io.dropwizard.metrics5.MetricName
void
put
(String key, Serializable value) Put method to store aSerializable
valuevoid
start()
Starts this cache.void
stop()
Stops this cache and releases related resources.Methods inherited from class org.nuxeo.ecm.core.cache.CacheWrapper
getName, getSize, hasEntry, invalidate, invalidateLocal, invalidateLocalAll, keySet, putLocal, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.nuxeo.ecm.core.cache.Cache
computeIfAbsent
-
Field Details
-
registry
protected io.dropwizard.metrics5.MetricRegistry registry -
read
protected io.dropwizard.metrics5.Counter read -
read_hit
protected io.dropwizard.metrics5.Counter read_hit -
read_miss
protected io.dropwizard.metrics5.Counter read_miss -
read_hit_ratio
protected io.dropwizard.metrics5.RatioGauge read_hit_ratio -
write
protected io.dropwizard.metrics5.Counter write -
invalidation
protected io.dropwizard.metrics5.Counter invalidation -
size
-
READ_HIT_NAME
protected final io.dropwizard.metrics5.MetricName READ_HIT_NAME -
READ_HIT_RATIO_NAME
protected final io.dropwizard.metrics5.MetricName READ_HIT_RATIO_NAME -
READ_MISS_NAME
protected final io.dropwizard.metrics5.MetricName READ_MISS_NAME -
READ_NAME
protected final io.dropwizard.metrics5.MetricName READ_NAME -
WRITE_NAME
protected final io.dropwizard.metrics5.MetricName WRITE_NAME -
INVALIDATE_ALL_NAME
protected final io.dropwizard.metrics5.MetricName INVALIDATE_ALL_NAME -
SIZE_NAME
protected final io.dropwizard.metrics5.MetricName SIZE_NAME
-
-
Constructor Details
-
CacheMetrics
-
-
Method Details
-
nameOf
-
start
public void start()Description copied from interface:CacheManagement
Starts this cache.- Specified by:
start
in interfaceCacheManagement
- Overrides:
start
in classCacheWrapper
-
stop
public void stop()Description copied from interface:CacheManagement
Stops this cache and releases related resources.- Specified by:
stop
in interfaceCacheManagement
- Overrides:
stop
in classCacheWrapper
-
get
Description copied from interface:Cache
Get method to retrieve value from cache Must not raise exception if the key is null, but return null- Specified by:
get
in interfaceCache
- Overrides:
get
in classCacheWrapper
- Parameters:
key
- the string key- Returns:
- the
Serializable
value, return null if the key does not exist or if the key is null
-
put
Description copied from interface:Cache
Put method to store aSerializable
value- Specified by:
put
in interfaceCache
- Overrides:
put
in classCacheWrapper
- Parameters:
key
- the string key, if null, the value will not be storedvalue
- the value to store, if null, the value will not be stored
-
invalidateAll
public void invalidateAll()Description copied from interface:Cache
Invalidate all key-value stored in the cache- Specified by:
invalidateAll
in interfaceCache
- Overrides:
invalidateAll
in classCacheWrapper
-