public class NoOpMetricProvider extends Object implements MetricProvider
Constructor and Description |
---|
NoOpMetricProvider() |
Modifier and Type | Method and Description |
---|---|
String |
getName()
Returns a unique name of the Metric Provider.
|
void |
init()
This will be called when initializing the default
MetricRegistry . |
Counter |
newCounter(MetricId metricId)
This returns the new instance of the Counter metric.
|
Gauge |
newGauge(MetricId metricId,
StatisticConfig... statisticConfigs)
This returns the new instance of the Gauge metric.
|
<T> PolledGauge |
newPolledGauge(MetricId metricId,
T obj,
ToDoubleFunction<T> toDoubleFunction)
This returns the new instance of the Polled Gauge metric.
|
public String getName()
MetricProvider
MetricRegistry
getName
in interface MetricProvider
public void init()
MetricProvider
MetricRegistry
.init
in interface MetricProvider
public Counter newCounter(MetricId metricId)
MetricProvider
newCounter
in interface MetricProvider
metricId
- ID of the metric that needs to be returned.public Gauge newGauge(MetricId metricId, StatisticConfig... statisticConfigs)
MetricProvider
newGauge
in interface MetricProvider
metricId
- ID of the metric that needs to be returned.statisticConfigs
- array of StatisticConfig
s which configures the distribution statistics.public <T> PolledGauge newPolledGauge(MetricId metricId, T obj, ToDoubleFunction<T> toDoubleFunction)
MetricProvider
newPolledGauge
in interface MetricProvider
T
- The type of the state object from which the gauge value is extracted.metricId
- ID of the metric that needs to be returned.obj
- State object used to compute a value.toDoubleFunction
- Function that produces an instantaneous gauge value from the state object.Copyright © 2018 WSO2. All rights reserved.