Class ScheduledReporterManager

java.lang.Object
io.dropwizard.metrics.common.ScheduledReporterManager
All Implemented Interfaces:
Managed

public class ScheduledReporterManager extends Object implements Managed
Manages a ScheduledReporter lifecycle.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ScheduledReporterManager(com.codahale.metrics.ScheduledReporter reporter, Duration period)
    Manages the given reporter by reporting with the given period.
    ScheduledReporterManager(com.codahale.metrics.ScheduledReporter reporter, Duration period, boolean reportOnStop)
    Manages the given reporter by reporting with the given period.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Begins reporting metrics using the configured ScheduledReporter.
    void
    Stops the configured ScheduledReporter from reporting metrics.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ScheduledReporterManager

      public ScheduledReporterManager(com.codahale.metrics.ScheduledReporter reporter, Duration period)
      Manages the given reporter by reporting with the given period.
      Parameters:
      reporter - the reporter to manage.
      period - the frequency to report metrics at.
      See Also:
    • ScheduledReporterManager

      public ScheduledReporterManager(com.codahale.metrics.ScheduledReporter reporter, Duration period, boolean reportOnStop)
      Manages the given reporter by reporting with the given period.
      Parameters:
      reporter - the reporter to manage.
      period - the frequency to report metrics at.
      reportOnStop - whether the reporter should send one last report upon stopping
      Since:
      2.0
  • Method Details

    • start

      public void start() throws Exception
      Begins reporting metrics using the configured ScheduledReporter.
      Specified by:
      start in interface Managed
      Throws:
      Exception
    • stop

      public void stop() throws Exception
      Stops the configured ScheduledReporter from reporting metrics.
      Specified by:
      stop in interface Managed
      Throws:
      Exception