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.Countercounter(String metricName, String... metricPath)Convenience method forSolrMetricManager.counter(SolrMetricsContext, String, String, String...).SolrMetricsContextgetChildContext(Object child)Get a context with the same registry name but a tag that represents a parent-child relationship.com.codahale.metrics.Histogramhistogram(String metricName, String... metricPath)Convenience method forSolrMetricManager.histogram(SolrMetricsContext, String, String, String...).com.codahale.metrics.Metermeter(String metricName, String... metricPath)Convenience method forSolrMetricManager.meter(SolrMetricsContext, String, String, String...).com.codahale.metrics.Timertimer(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:SolrMetricsContextConvenience method forSolrMetricManager.meter(SolrMetricsContext, String, String, String...).- Overrides:
 meterin classSolrMetricsContext
 
- 
counter
public com.codahale.metrics.Counter counter(String metricName, String... metricPath)
Description copied from class:SolrMetricsContextConvenience method forSolrMetricManager.counter(SolrMetricsContext, String, String, String...).- Overrides:
 counterin classSolrMetricsContext
 
- 
timer
public com.codahale.metrics.Timer timer(String metricName, String... metricPath)
Description copied from class:SolrMetricsContextConvenience method forSolrMetricManager.meter(SolrMetricsContext, String, String, String...).- Overrides:
 timerin classSolrMetricsContext
 
- 
histogram
public com.codahale.metrics.Histogram histogram(String metricName, String... metricPath)
Description copied from class:SolrMetricsContextConvenience method forSolrMetricManager.histogram(SolrMetricsContext, String, String, String...).- Overrides:
 histogramin classSolrMetricsContext
 
- 
getChildContext
public SolrMetricsContext getChildContext(Object child)
Description copied from class:SolrMetricsContextGet 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:
 getChildContextin classSolrMetricsContext- Parameters:
 child- child object that produces metrics with a different life-cycle than the parent.
 
 - 
 
 -