|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.yarn.support.PollingTaskSupport<T>
T - the return type of poll taskpublic abstract class PollingTaskSupport<T>
Helper class to ease working with polling tasks executed using Spring TaskScheduler and TaskExecutor.
| Constructor Summary | |
|---|---|
PollingTaskSupport(TaskScheduler taskScheduler,
TaskExecutor taskExecutor)
Instantiates a new polling task support. |
|
PollingTaskSupport(TaskScheduler taskScheduler,
TaskExecutor taskExecutor,
TimeUnit unit,
long duration)
Instantiates a new polling task support. |
|
PollingTaskSupport(TaskScheduler taskScheduler,
TaskExecutor taskExecutor,
Trigger trigger)
Instantiates a new polling task support. |
|
| Method Summary | |
|---|---|
protected abstract T |
doPoll()
Do poll. |
void |
init()
Inits the poller. |
protected void |
onPollResult(T result)
Callback on poll result. |
void |
setTrigger(Trigger trigger)
Sets the trigger. |
void |
start()
Starts the poller. |
void |
stop()
Stops the poller. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PollingTaskSupport(TaskScheduler taskScheduler,
TaskExecutor taskExecutor)
PeriodicTrigger is used.
taskScheduler - the task schedulertaskExecutor - the task executor
public PollingTaskSupport(TaskScheduler taskScheduler,
TaskExecutor taskExecutor,
TimeUnit unit,
long duration)
PeriodicTrigger is used.
taskScheduler - the task schedulertaskExecutor - the task executorunit - the unitduration - the duration
public PollingTaskSupport(TaskScheduler taskScheduler,
TaskExecutor taskExecutor,
Trigger trigger)
taskScheduler - the task schedulertaskExecutor - the task executortrigger - the trigger| Method Detail |
|---|
public void init()
public void start()
public void stop()
public void setTrigger(Trigger trigger)
trigger - the new triggerprotected abstract T doPoll()
protected void onPollResult(T result)
result - the result
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||