public class Metrics extends SolrCacheBase implements SolrInfoBean, SolrMetricProducer
SolrInfoBean
that provides metrics on block cache operations.SolrCacheBase.AutoWarmCountRef
SolrInfoBean.Category, SolrInfoBean.Group
Modifier and Type | Field and Description |
---|---|
AtomicLong |
blockCacheEviction |
AtomicLong |
blockCacheHit |
AtomicLong |
blockCacheMiss |
AtomicLong |
blockCacheSize |
AtomicLong |
blockCacheStoreFail |
AtomicLong |
blockCacheStoreFail_last |
AtomicLong |
shardBuffercacheAllocate |
AtomicLong |
shardBuffercacheLost |
autowarm, regenerator
Constructor and Description |
---|
Metrics() |
Modifier and Type | Method and Description |
---|---|
String |
getDescription()
Simple one or two line description
|
Set<String> |
getMetricNames()
Modifiable set of metric names that this component reports (default is null,
which means none).
|
String |
getName()
Simple common usage name, e.g.
|
SolrMetricsContext |
getSolrMetricsContext()
Implementing classes should override this method to provide the context obtained in
SolrMetricProducer.initializeMetrics(SolrMetricsContext, String) to ensure proper cleanup of metrics
at the end of the life-cycle of this component. |
void |
initializeMetrics(SolrMetricsContext parentContext,
String scope)
Initialize metrics specific to this producer.
|
calcHitRatio, getAutowarmDescription, getCategory, getState, getVersion, init, isAutowarmingOn, name, setState
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getCategory, getMetricRegistry, getMetricsSnapshot, registerMetricName
close, getUniqueMetricTag, initializeMetrics
public AtomicLong blockCacheSize
public AtomicLong blockCacheHit
public AtomicLong blockCacheMiss
public AtomicLong blockCacheEviction
public AtomicLong blockCacheStoreFail
public AtomicLong blockCacheStoreFail_last
public AtomicLong shardBuffercacheAllocate
public AtomicLong shardBuffercacheLost
public void initializeMetrics(SolrMetricsContext parentContext, String scope)
SolrMetricProducer
initializeMetrics
in interface SolrMetricProducer
parentContext
- parent metrics context. If this component has the same life-cycle as the parent
it can simply use the parent context, otherwise it should obtain a child context
using SolrMetricsContext.getChildContext(Object)
passing this
as the child.scope
- component scopepublic String getName()
SolrInfoBean
getName
in interface SolrInfoBean
public String getDescription()
SolrInfoBean
getDescription
in interface SolrInfoBean
public Set<String> getMetricNames()
SolrInfoBean
SolrInfoBean.registerMetricName(String)
to capture what metrics names are reported from this component.
NOTE: this set has to allow iteration under modifications.
getMetricNames
in interface SolrInfoBean
public SolrMetricsContext getSolrMetricsContext()
SolrMetricProducer
SolrMetricProducer.initializeMetrics(SolrMetricsContext, String)
to ensure proper cleanup of metrics
at the end of the life-cycle of this component.getSolrMetricsContext
in interface SolrMetricProducer
Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.