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 String
private TimeUnit
private MetricFilter
private MBeanServer
private TimeUnit
private final MetricRegistry
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds aJmxReporter
with 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 specificTimeUnit
s for the duration of the metrics with these names.specificRateUnits
(Map<String, TimeUnit> specificRateUnits) Use specificTimeUnit
s 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 specificTimeUnit
s for the duration of the metrics with these names.- Parameters:
specificDurationUnits
- a map of metric names and specificTimeUnit
s- Returns:
this
-
specificRateUnits
Use specificTimeUnit
s for the rate of the metrics with these names.- Parameters:
specificRateUnits
- a map of metric names and specificTimeUnit
s- Returns:
this
-
build
Builds aJmxReporter
with the given properties.- Returns:
- a
JmxReporter
-