public static final class NullMetricsProvider.NullMetricsContext extends Object implements MetricsContext
MetricsContext.DetailLevel| Modifier and Type | Field and Description |
|---|---|
static NullMetricsProvider.NullMetricsContext |
INSTANCE |
| Constructor and Description |
|---|
NullMetricsContext() |
| Modifier and Type | Method and Description |
|---|---|
MetricsContext |
getContext(String name)
Returns a sub context.
|
Counter |
getCounter(String name)
Returns a counter.
|
CounterSet |
getCounterSet(String name)
Returns the CounterSet identified by the given name
Null name is not allowed
|
Summary |
getSummary(String name,
MetricsContext.DetailLevel detailLevel)
Returns a summary.
|
SummarySet |
getSummarySet(String name,
MetricsContext.DetailLevel detailLevel)
Returns a set of summaries.
|
void |
registerGauge(String name,
Gauge gauge)
Registers an user provided
Gauge which will be called by the
MetricsProvider in order to sample an integer value. |
void |
registerGaugeSet(String name,
GaugeSet gaugeSet)
Registers a user provided
GaugeSet which will be called by the
MetricsProvider in order to sample number values. |
void |
unregisterGauge(String name)
Unregisters the user provided
Gauge bound to the given name. |
void |
unregisterGaugeSet(String name)
Unregisters the user provided
GaugeSet bound to the given name. |
public static final NullMetricsProvider.NullMetricsContext INSTANCE
public MetricsContext getContext(String name)
MetricsContextgetContext in interface MetricsContextname - the name of the subcontextpublic Counter getCounter(String name)
MetricsContextgetCounter in interface MetricsContextpublic CounterSet getCounterSet(String name)
MetricsContextgetCounterSet in interface MetricsContextpublic void registerGauge(String name, Gauge gauge)
MetricsContextGauge which will be called by the
MetricsProvider in order to sample an integer value.
If another Gauge was already registered the new one will
take its place.
Registering a null callback is not allowed.registerGauge in interface MetricsContextname - unique name of the Gauge in this contextgauge - the implementation of the Gaugepublic void unregisterGauge(String name)
MetricsContextGauge bound to the given name.unregisterGauge in interface MetricsContextname - unique name of the Gauge in this contextpublic void registerGaugeSet(String name, GaugeSet gaugeSet)
MetricsContextGaugeSet which will be called by the
MetricsProvider in order to sample number values.
If another GaugeSet was already registered, the new one will take its place.
Registering with a null name or null callback is not allowed.registerGaugeSet in interface MetricsContextname - unique name of the GaugeSet in this contextgaugeSet - the implementation of the GaugeSetpublic void unregisterGaugeSet(String name)
MetricsContextGaugeSet bound to the given name.
Unregistering with a null name is not allowed.unregisterGaugeSet in interface MetricsContextname - unique name of the GaugeSet in this contextpublic Summary getSummary(String name, MetricsContext.DetailLevel detailLevel)
MetricsContextgetSummary in interface MetricsContextpublic SummarySet getSummarySet(String name, MetricsContext.DetailLevel detailLevel)
MetricsContextgetSummarySet in interface MetricsContextCopyright © 2008–2023 The Apache Software Foundation. All rights reserved.