@ProviderType public interface MetricsService
MetricsService
enables creation of various types of Metric
.Modifier and Type | Field and Description |
---|---|
static MetricsService |
NOOP
Dummy variant of MetricsService which does not
collect any metric
|
Modifier and Type | Method and Description |
---|---|
<A> A |
adaptTo(java.lang.Class<A> type)
Adapts the service to the specified type.
|
Counter |
counter(java.lang.String name)
Creates a new
Counter and registers it under the given name. |
Histogram |
histogram(java.lang.String name)
Creates a new
Histogram and registers it under the given name. |
Meter |
meter(java.lang.String name)
Creates a new
Meter and registers it under the given name. |
Timer |
timer(java.lang.String name)
Creates a new
Timer and registers it under the given name. |
static final MetricsService NOOP
Timer timer(java.lang.String name)
Timer
and registers it under the given name.
If a timer with same name exists then same instance is returnedname
- the name of the metricTimer
Histogram histogram(java.lang.String name)
Histogram
and registers it under the given name.
If a histogram with same name exists then same instance is returned.name
- the name of the metricHistogram
Counter counter(java.lang.String name)
Counter
and registers it under the given name.
If a counter with same name exists then same instance is returnedname
- the name of the metricCounter
Meter meter(java.lang.String name)
Meter
and registers it under the given name.
If a meter with same name exists then same instance is returnedname
- the name of the metricMeter
<A> A adaptTo(java.lang.Class<A> type)
MetricRegistry
A
- The type to which this metric is to be adapted.type
- Class object for the type to which this metric is to be adapted.Copyright © 2010 - 2020 Adobe. All Rights Reserved