public abstract class AbstractPollingReporter extends AbstractReporter implements Runnable
Modifier | Constructor and Description |
---|---|
protected |
AbstractPollingReporter(MetricsRegistry registry,
String name)
Creates a new
AbstractPollingReporter instance. |
Modifier and Type | Method and Description |
---|---|
abstract void |
run()
The method called when a a poll is scheduled to occur.
|
void |
shutdown()
Stops the reporter and closes any internal resources.
|
void |
shutdown(long timeout,
TimeUnit unit)
Shuts down the reporter polling, waiting the specific amount of time for any current polls to
complete.
|
void |
start(long period,
TimeUnit unit)
Starts the reporter polling at the given period.
|
getMetricsRegistry
protected AbstractPollingReporter(MetricsRegistry registry, String name)
AbstractPollingReporter
instance.registry
- the MetricsRegistry
containing the metrics this reporter will
reportname
- the reporter's nameAbstractReporter.AbstractReporter(MetricsRegistry)
public void start(long period, TimeUnit unit)
period
- the amount of time between pollsunit
- the unit for period
public void shutdown(long timeout, TimeUnit unit) throws InterruptedException
timeout
- the maximum time to waitunit
- the unit for timeout
InterruptedException
- if interrupted while waitingpublic void shutdown()
AbstractReporter
shutdown
in class AbstractReporter
Copyright © 2005–2022. All rights reserved.