Package com.codahale.metrics
Class JmxReporter.Builder
java.lang.Object
com.codahale.metrics.JmxReporter.Builder
- Enclosing class:
JmxReporter
A builder for
CsvReporter instances. Defaults to using the default MBean server and
not filtering metrics.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Stringprivate TimeUnitprivate MetricFilterprivate MBeanServerprivate TimeUnitprivate final MetricRegistry -
Constructor Summary
Constructors -
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.filter(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.
-
Field Details
-
registry
-
mBeanServer
-
rateUnit
-
durationUnit
-
filter
-
domain
-
specificDurationUnits
-
specificRateUnits
-
-
Constructor Details
-
Builder
-
-
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
-
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
-