Package com.codahale.metrics.jmx
Class JmxReporter.Builder
java.lang.Object
com.codahale.metrics.jmx.JmxReporter.Builder
- Enclosing class:
- JmxReporter
A builder for
JmxReporter instances. Defaults to using the default MBean server and
not filtering metrics.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aJmxReporterwith the given properties.convertDurationsTo(TimeUnit durationUnit) Convert durations to the given time unit.convertRatesTo(TimeUnit rateUnit) Convert rates to the given time unit.createsObjectNamesWith(ObjectNameFactory onFactory) filter(com.codahale.metrics.MetricFilter filter) Only report metrics which match the given filter.registerWith(MBeanServer mBeanServer) Register MBeans with the givenMBeanServer.specificDurationUnits(Map<String, TimeUnit> specificDurationUnits) Use specificTimeUnits for the duration of the metrics with these names.specificRateUnits(Map<String, TimeUnit> specificRateUnits) Use specificTimeUnits for the rate of the metrics with these names.
-
Method Details
-
registerWith
Register MBeans with the givenMBeanServer.- Parameters:
mBeanServer- anMBeanServer- Returns:
this
-
convertRatesTo
Convert rates to the given time unit.- Parameters:
rateUnit- a unit of time- Returns:
this
-
createsObjectNamesWith
-
convertDurationsTo
Convert durations to the given time unit.- Parameters:
durationUnit- a unit of time- Returns:
this
-
filter
Only report metrics which match the given filter.- Parameters:
filter- aMetricFilter- Returns:
this
-
inDomain
-
specificDurationUnits
Use specificTimeUnits for the duration of the metrics with these names.- Parameters:
specificDurationUnits- a map of metric names and specificTimeUnits- Returns:
this
-
specificRateUnits
Use specificTimeUnits for the rate of the metrics with these names.- Parameters:
specificRateUnits- a map of metric names and specificTimeUnits- Returns:
this
-
build
Builds aJmxReporterwith the given properties.- Returns:
- a
JmxReporter
-