Package io.dropwizard.metrics.common
Class ScheduledReporterManager
java.lang.Object
io.dropwizard.metrics.common.ScheduledReporterManager
- All Implemented Interfaces:
io.dropwizard.lifecycle.Managed
Manages a
ScheduledReporter lifecycle.-
Constructor Summary
ConstructorsConstructorDescriptionScheduledReporterManager(com.codahale.metrics.ScheduledReporter reporter, io.dropwizard.util.Duration period) Manages the givenreporterby reporting with the givenperiod.ScheduledReporterManager(com.codahale.metrics.ScheduledReporter reporter, io.dropwizard.util.Duration period, boolean reportOnStop) Manages the givenreporterby reporting with the givenperiod. -
Method Summary
-
Constructor Details
-
ScheduledReporterManager
public ScheduledReporterManager(com.codahale.metrics.ScheduledReporter reporter, io.dropwizard.util.Duration period) Manages the givenreporterby reporting with the givenperiod.- Parameters:
reporter- the reporter to manage.period- the frequency to report metrics at.- See Also:
-
ScheduledReporterManager
public ScheduledReporterManager(com.codahale.metrics.ScheduledReporter reporter, io.dropwizard.util.Duration period, boolean reportOnStop) Manages the givenreporterby reporting with the givenperiod.- 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
Begins reporting metrics using the configuredScheduledReporter.- Specified by:
startin interfaceio.dropwizard.lifecycle.Managed- Throws:
Exception
-
stop
Stops the configuredScheduledReporterfrom reporting metrics.- Specified by:
stopin interfaceio.dropwizard.lifecycle.Managed- Throws:
Exception
-