Class JmxReporter.Builder

  • Enclosing class:
    JmxReporter

    public static class JmxReporter.Builder
    extends Object
    A builder for JmxReporter instances. Defaults to using the default MBean server and not filtering metrics.
    • Method Detail

      • convertRatesTo

        public JmxReporter.Builder convertRatesTo​(TimeUnit rateUnit)
        Convert rates to the given time unit.
        Parameters:
        rateUnit - a unit of time
        Returns:
        this
      • convertDurationsTo

        public JmxReporter.Builder convertDurationsTo​(TimeUnit durationUnit)
        Convert durations to the given time unit.
        Parameters:
        durationUnit - a unit of time
        Returns:
        this
      • filter

        public JmxReporter.Builder filter​(com.codahale.metrics.MetricFilter filter)
        Only report metrics which match the given filter.
        Parameters:
        filter - a MetricFilter
        Returns:
        this
      • specificDurationUnits

        public JmxReporter.Builder specificDurationUnits​(Map<String,​TimeUnit> specificDurationUnits)
        Use specific TimeUnits for the duration of the metrics with these names.
        Parameters:
        specificDurationUnits - a map of metric names and specific TimeUnits
        Returns:
        this
      • specificRateUnits

        public JmxReporter.Builder specificRateUnits​(Map<String,​TimeUnit> specificRateUnits)
        Use specific TimeUnits for the rate of the metrics with these names.
        Parameters:
        specificRateUnits - a map of metric names and specific TimeUnits
        Returns:
        this