|
||||||||||
| 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 milliseconds| Method Detail |
|---|
public boolean start()
Poller
start in interface Pollerpublic void stop()
Poller
stop in interface Pollerprotected 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 | |||||||||