|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.netflix.servo.publish.PollScheduler
public final class PollScheduler
Basic scheduler for polling metrics and reporting them to observers. You
can add PollRunnable objects but not remove them individually.
If you stop the instance and then start it again all of the prior tasks
will be thrown away.
| Method Summary | |
|---|---|
void |
addPoller(PollRunnable task,
long delay,
java.util.concurrent.TimeUnit timeUnit)
Add a tasks to execute at a fixed rate based on the provided delay. |
static PollScheduler |
getInstance()
Return the instance of this scheduler. |
boolean |
isStarted()
Returns true if this scheduler is currently started. |
void |
start()
Start scheduling tasks with a default thread pool, sized based on the number of available processors. |
void |
start(java.util.concurrent.ScheduledExecutorService service)
Start the poller with the given executor service. |
void |
stop()
Stop the poller, shutting down the current executor service. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static PollScheduler getInstance()
public void addPoller(PollRunnable task,
long delay,
java.util.concurrent.TimeUnit timeUnit)
public void start()
public void start(java.util.concurrent.ScheduledExecutorService service)
public void stop()
public boolean isStarted()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||