|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.cumulocity.sdk.client.FixedRatePoller
public abstract class FixedRatePoller
A poller that triggers tasks to execute at a fixed rate.
This class will trigger the defined pollingTask to run at the configured period.
Constructor Summary | |
---|---|
FixedRatePoller(ScheduledThreadPoolExecutor pollingExecutor,
long periodInterval)
Create a fixed rate poller using the given thread pool and with the given fixed rate period. |
Method Summary | |
---|---|
protected long |
getPeriod()
|
protected Runnable |
getPollingTask()
|
protected void |
setPollingTask(Runnable pollingTask)
|
boolean |
start()
Starts poller |
void |
stop()
Stops poller after finishing all started jobs |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FixedRatePoller(ScheduledThreadPoolExecutor pollingExecutor, long periodInterval)
periodInterval
- polling interval in millisecondsMethod Detail |
---|
public boolean start()
Poller
start
in interface Poller
public void stop()
Poller
stop
in interface Poller
protected void setPollingTask(Runnable pollingTask)
protected Runnable getPollingTask()
protected long getPeriod()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |