Package org.cyclos.impl.utils.tasks
Interface PollingTaskHandlerImplementor
-
- All Superinterfaces:
PollingTaskHandler
- All Known Implementing Classes:
PollingTaskHandlerImpl
public interface PollingTaskHandlerImplementor extends PollingTaskHandler
Contains the internal methods forPollingTaskHandler
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidawakeNow(PollingTask pollingTask)Awakes the givenPollingTask's thread now.voidcancelTasks()Cancels schedulings for allPollingTasks<T extends PollingTask>
TgetTask(Class<T> pollingTaskType)Returns aPollingTaskHandlerby classvoidonTaskFinished(PollingTask pollingTask)Indicates that the task has finished executingvoidonTaskStarted(PollingTask pollingTask)Indicates that the task has started executingvoidreschedule(Class<? extends PollingTask> pollingTaskType, Date nextExecution)Reschedules the givenPollingTaskto run after the givenDatevoidscheduleTasks()Schedules allPollingTaskexecutions (if not already started)-
Methods inherited from interface org.cyclos.impl.utils.tasks.PollingTaskHandler
scheduleAwake
-
-
-
-
Method Detail
-
awakeNow
void awakeNow(PollingTask pollingTask)
Awakes the givenPollingTask's thread now. Not intended to be used by business services, as invoking it within a DB transaction would probably result in data to be processed not yet visible to thePollingTask, which runs in a separated DB transaction.
-
cancelTasks
void cancelTasks()
Cancels schedulings for allPollingTasks
-
getTask
<T extends PollingTask> T getTask(Class<T> pollingTaskType)
Returns aPollingTaskHandlerby class
-
onTaskFinished
void onTaskFinished(PollingTask pollingTask)
Indicates that the task has finished executing
-
onTaskStarted
void onTaskStarted(PollingTask pollingTask)
Indicates that the task has started executing
-
reschedule
void reschedule(Class<? extends PollingTask> pollingTaskType, Date nextExecution)
Reschedules the givenPollingTaskto run after the givenDate
-
scheduleTasks
void scheduleTasks()
Schedules allPollingTaskexecutions (if not already started)
-
-