Package org.apache.solr.metrics
Class SolrDelegateRegistryMetricsContext
- java.lang.Object
-
- org.apache.solr.metrics.SolrMetricsContext
-
- org.apache.solr.metrics.SolrDelegateRegistryMetricsContext
-
public class SolrDelegateRegistryMetricsContext extends SolrMetricsContext
This class represents a metrics context that is delegate aware in that it is aware of multiple metric registries, a primary and a delegate. This enables creating metrics that are tracked at multiple levels, i.e. core-level and node-level. This class will create instances of new Timer, Meter, Counter, Histogram implementations that hold references to both primary and delegate implementations of corresponding classes. The DelegateRegistry* metric classes are just pass-through to two different implementations. As such the DelegateRegistry* metric classes do not hold any metric data themselves.- See Also:
SolrMetricsContext
-
-
Constructor Summary
Constructors Constructor Description SolrDelegateRegistryMetricsContext(SolrMetricManager metricManager, String registry, String tag, String delegateRegistry)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.codahale.metrics.Counter
counter(String metricName, String... metricPath)
Convenience method forSolrMetricManager.counter(SolrMetricsContext, String, String, String...)
.SolrMetricsContext
getChildContext(Object child)
Get a context with the same registry name but a tag that represents a parent-child relationship.com.codahale.metrics.Histogram
histogram(String metricName, String... metricPath)
Convenience method forSolrMetricManager.histogram(SolrMetricsContext, String, String, String...)
.com.codahale.metrics.Meter
meter(String metricName, String... metricPath)
Convenience method forSolrMetricManager.meter(SolrMetricsContext, String, String, String...)
.com.codahale.metrics.Timer
timer(String metricName, String... metricPath)
Convenience method forSolrMetricManager.meter(SolrMetricsContext, String, String, String...)
.-
Methods inherited from class org.apache.solr.metrics.SolrMetricsContext
gauge, getMetricManager, getMetricNames, getMetricRegistry, getMetricsSnapshot, getRegistryName, getTag, notANumber, nullNumber, nullObject, nullString, registerMetricName, unregister
-
-
-
-
Constructor Detail
-
SolrDelegateRegistryMetricsContext
public SolrDelegateRegistryMetricsContext(SolrMetricManager metricManager, String registry, String tag, String delegateRegistry)
-
-
Method Detail
-
meter
public com.codahale.metrics.Meter meter(String metricName, String... metricPath)
Description copied from class:SolrMetricsContext
Convenience method forSolrMetricManager.meter(SolrMetricsContext, String, String, String...)
.- Overrides:
meter
in classSolrMetricsContext
-
counter
public com.codahale.metrics.Counter counter(String metricName, String... metricPath)
Description copied from class:SolrMetricsContext
Convenience method forSolrMetricManager.counter(SolrMetricsContext, String, String, String...)
.- Overrides:
counter
in classSolrMetricsContext
-
timer
public com.codahale.metrics.Timer timer(String metricName, String... metricPath)
Description copied from class:SolrMetricsContext
Convenience method forSolrMetricManager.meter(SolrMetricsContext, String, String, String...)
.- Overrides:
timer
in classSolrMetricsContext
-
histogram
public com.codahale.metrics.Histogram histogram(String metricName, String... metricPath)
Description copied from class:SolrMetricsContext
Convenience method forSolrMetricManager.histogram(SolrMetricsContext, String, String, String...)
.- Overrides:
histogram
in classSolrMetricsContext
-
getChildContext
public SolrMetricsContext getChildContext(Object child)
Description copied from class:SolrMetricsContext
Get a context with the same registry name but a tag that represents a parent-child relationship. Since it's a different tag than the parent's context it is assumed that the life-cycle of the parent and child are different.- Overrides:
getChildContext
in classSolrMetricsContext
- Parameters:
child
- child object that produces metrics with a different life-cycle than the parent.
-
-