Package org.apache.solr.metrics
Class SolrMetricManager.GaugeWrapper<T>
java.lang.Object
org.apache.solr.metrics.SolrMetricManager.GaugeWrapper<T>
- All Implemented Interfaces:
com.codahale.metrics.Gauge<T>,com.codahale.metrics.Metric
- Enclosing class:
SolrMetricManager
public static class SolrMetricManager.GaugeWrapper<T>
extends Object
implements com.codahale.metrics.Gauge<T>
This is a wrapper for
Gauge metrics, which are usually implemented as lambdas that
often keep a reference to their parent instance. In order to make sure that all such metrics
are removed when their parent instance is removed / closed the metric is associated with an
instance tag, which can be used then to remove wrappers with the matching tag using SolrMetricManager.unregisterGauges(String, String).-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
GaugeWrapper
-
-
Method Details
-
getValue
- Specified by:
getValuein interfacecom.codahale.metrics.Gauge<T>
-
getTag
-
getGauge
-