@Internal public class InternalCacheMetricGroup extends ProxyMetricGroup<MetricGroup> implements CacheMetricGroup
CacheMetricGroup
which register all cache related metrics under a subgroup of the
parent metric group.Modifier and Type | Field and Description |
---|---|
static long |
UNINITIALIZED |
parentMetricGroup
Constructor and Description |
---|
InternalCacheMetricGroup(MetricGroup parentMetricGroup,
String subGroupName)
Creates a subgroup with the specified subgroup name under the parent group.
|
Modifier and Type | Method and Description |
---|---|
void |
hitCounter(Counter hitCounter)
The number of cache hits.
|
void |
latestLoadTimeGauge(Gauge<Long> latestLoadTimeGauge)
The time spent for the latest load operation.
|
void |
loadCounter(Counter loadCounter)
The number of times to load data into cache from external system.
|
void |
missCounter(Counter missCounter)
The number of cache misses.
|
void |
numCachedBytesGauge(Gauge<Long> numCachedBytesGauge)
The number of bytes used by cache.
|
void |
numCachedRecordsGauge(Gauge<Long> numCachedRecordsGauge)
The number of records in cache.
|
void |
numLoadFailuresCounter(Counter numLoadFailuresCounter)
The number of load failures.
|
addGroup, addGroup, counter, counter, gauge, getAllVariables, getMetricIdentifier, getMetricIdentifier, getScopeComponents, histogram, meter
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addGroup, addGroup, addGroup, counter, counter, counter, counter, gauge, gauge, getAllVariables, getMetricIdentifier, getMetricIdentifier, getScopeComponents, histogram, histogram, meter, meter
public static final long UNINITIALIZED
public InternalCacheMetricGroup(MetricGroup parentMetricGroup, String subGroupName)
For example the hit counter will be registered as "root.cache.hitCount", with parentMetricGroup = root
and subGroupName = "cache"
.
parentMetricGroup
- parent metric group of the subgroupsubGroupName
- name of the subgrouppublic void hitCounter(Counter hitCounter)
CacheMetricGroup
hitCounter
in interface CacheMetricGroup
public void missCounter(Counter missCounter)
CacheMetricGroup
missCounter
in interface CacheMetricGroup
public void loadCounter(Counter loadCounter)
CacheMetricGroup
loadCounter
in interface CacheMetricGroup
public void numLoadFailuresCounter(Counter numLoadFailuresCounter)
CacheMetricGroup
numLoadFailuresCounter
in interface CacheMetricGroup
public void latestLoadTimeGauge(Gauge<Long> latestLoadTimeGauge)
CacheMetricGroup
latestLoadTimeGauge
in interface CacheMetricGroup
public void numCachedRecordsGauge(Gauge<Long> numCachedRecordsGauge)
CacheMetricGroup
numCachedRecordsGauge
in interface CacheMetricGroup
public void numCachedBytesGauge(Gauge<Long> numCachedBytesGauge)
CacheMetricGroup
numCachedBytesGauge
in interface CacheMetricGroup
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.