public class MetricsServiceImpl extends Object implements MetricsService
NOOP
Constructor and Description |
---|
MetricsServiceImpl() |
Modifier and Type | Method and Description |
---|---|
<A> A |
adaptTo(Class<A> type)
Adapts the service to the specified type.
|
Counter |
counter(String name)
Creates a new
Counter and registers it under the given name. |
Histogram |
histogram(String name)
Creates a new
Histogram and registers it under the given name. |
Meter |
meter(String name)
Creates a new
Meter and registers it under the given name. |
Timer |
timer(String name)
Creates a new
Timer and registers it under the given name. |
public Timer timer(String name)
MetricsService
Timer
and registers it under the given name.
If a timer with same name exists then same instance is returnedtimer
in interface MetricsService
name
- the name of the metricTimer
public Histogram histogram(String name)
MetricsService
Histogram
and registers it under the given name.
If a histogram with same name exists then same instance is returned.histogram
in interface MetricsService
name
- the name of the metricHistogram
public Counter counter(String name)
MetricsService
Counter
and registers it under the given name.
If a counter with same name exists then same instance is returnedcounter
in interface MetricsService
name
- the name of the metricCounter
public Meter meter(String name)
MetricsService
Meter
and registers it under the given name.
If a meter with same name exists then same instance is returnedmeter
in interface MetricsService
name
- the name of the metricMeter
public <A> A adaptTo(Class<A> type)
MetricsService
MetricRegistry
adaptTo
in interface MetricsService
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 © 2007–2018 The Apache Software Foundation. All rights reserved.