Class MetricStatisticsProvider
java.lang.Object
org.apache.jackrabbit.oak.plugins.metric.MetricStatisticsProvider
- All Implemented Interfaces:
Closeable
,AutoCloseable
,StatisticsProvider
-
Field Summary
Fields inherited from interface org.apache.jackrabbit.oak.stats.StatisticsProvider
NOOP
-
Constructor Summary
ConstructorsConstructorDescriptionMetricStatisticsProvider
(MBeanServer server, ScheduledExecutorService executor) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
getCounterStats
(String name, StatsOptions options) <T> GaugeStats<T>
Creates a newGaugeStats
and registers it under the given name.getHistogram
(String name, StatsOptions options) getMeter
(String name, StatsOptions options) com.codahale.metrics.MetricRegistry
getStats()
getTimer
(String name, StatsOptions options)
-
Constructor Details
-
MetricStatisticsProvider
-
-
Method Details
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
getStats
- Specified by:
getStats
in interfaceStatisticsProvider
-
getMeter
- Specified by:
getMeter
in interfaceStatisticsProvider
-
getCounterStats
- Specified by:
getCounterStats
in interfaceStatisticsProvider
-
getTimer
- Specified by:
getTimer
in interfaceStatisticsProvider
-
getHistogram
- Specified by:
getHistogram
in interfaceStatisticsProvider
-
getGauge
Description copied from interface:StatisticsProvider
Creates a newGaugeStats
and registers it under the given name. If a gauge with the same exists already then the same instance is returned.- Specified by:
getGauge
in interfaceStatisticsProvider
- Type Parameters:
T
- the type of the metric- Parameters:
name
- the name of the gaugesupplier
- provides the values which are returned by the gauge- Returns:
- the gauge
-
getRegistry
public com.codahale.metrics.MetricRegistry getRegistry()
-