|
Spring for Apache Hadoop | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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(org.springframework.scheduling.TaskScheduler taskScheduler,
org.springframework.core.task.TaskExecutor taskExecutor)
Instantiates a new polling task support. |
|
PollingTaskSupport(org.springframework.scheduling.TaskScheduler taskScheduler,
org.springframework.core.task.TaskExecutor taskExecutor,
java.util.concurrent.TimeUnit unit,
long duration)
Instantiates a new polling task support. |
|
PollingTaskSupport(org.springframework.scheduling.TaskScheduler taskScheduler,
org.springframework.core.task.TaskExecutor taskExecutor,
org.springframework.scheduling.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(org.springframework.scheduling.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(org.springframework.scheduling.TaskScheduler taskScheduler, org.springframework.core.task.TaskExecutor taskExecutor)
PeriodicTrigger
is used.
taskScheduler
- the task schedulertaskExecutor
- the task executorpublic PollingTaskSupport(org.springframework.scheduling.TaskScheduler taskScheduler, org.springframework.core.task.TaskExecutor taskExecutor, java.util.concurrent.TimeUnit unit, long duration)
PeriodicTrigger
is used.
taskScheduler
- the task schedulertaskExecutor
- the task executorunit
- the unitduration
- the durationpublic PollingTaskSupport(org.springframework.scheduling.TaskScheduler taskScheduler, org.springframework.core.task.TaskExecutor taskExecutor, org.springframework.scheduling.Trigger trigger)
taskScheduler
- the task schedulertaskExecutor
- the task executortrigger
- the triggerMethod Detail |
---|
public void init()
public void start()
public void stop()
public void setTrigger(org.springframework.scheduling.Trigger trigger)
trigger
- the new triggerprotected abstract T doPoll()
protected void onPollResult(T result)
result
- the result
|
Spring for Apache Hadoop | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |