public class HystrixMetricsPoller
extends java.lang.Object
Polling can be stopped/started. Use shutdown() to permanently shutdown the poller.
Modifier and Type | Class and Description |
---|---|
static interface |
HystrixMetricsPoller.MetricsAsJsonPollerListener |
Constructor and Description |
---|
HystrixMetricsPoller(HystrixMetricsPoller.MetricsAsJsonPollerListener listener,
int delay)
Allocate resources to begin polling.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isRunning() |
void |
pause()
Pause (stop) polling.
|
void |
shutdown()
Stops polling and shuts down the ExecutorService.
|
void |
start()
Start polling.
|
public HystrixMetricsPoller(HystrixMetricsPoller.MetricsAsJsonPollerListener listener, int delay)
Use start
to begin polling.
Use shutdown
to cleanup resources and stop polling.
Use pause
to temporarily stop polling that can be restarted again with start
.
listener
- for callbacksdelay
- public void start()
public void pause()
start
as long as shutdown
is not called.public void shutdown()
This instance can no longer be used after calling shutdown.
public boolean isRunning()