Package org.cyclos.impl.utils.tasks
Interface RecurringTaskHandlerImplementor
-
- All Superinterfaces:
ApplicationInitializationListener,BaseApplicationInitializationListener,RecurringTaskHandler
public interface RecurringTaskHandlerImplementor extends RecurringTaskHandler, ApplicationInitializationListener
Contains the internal methods forRecurringTaskHandler
-
-
Field Summary
-
Fields inherited from interface org.cyclos.impl.BaseApplicationInitializationListener
MAX_PRIORITY, MIN_PRIORITY, NORMAL_PRIORITY
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidawakeNow(RecurringTask recurringTask)Awakes the givenRecurringTask's thread now.DategetFirstExecution(RecurringTask task)Returns the time for the first execution of a task.DategetNextExecution(RecurringTask task)Returns the next time the task should be executed.Set<RunningTaskDescriptor>getRunningTasks()Returns an unmodifiable view with information about the recurring tasks that are currently running.<T extends RecurringTask>
TgetTask(Class<T> recurringTaskType)Returns aRecurringTaskby classvoidonTaskFinished(RecurringTask recurringTask)Indicates that the task has finished executingvoidonTaskStarted(RecurringTask recurringTask)Indicates that the task has started executingvoidscheduleTasks()Schedules the tasks to be executed-
Methods inherited from interface org.cyclos.impl.ApplicationInitializationListener
onApplicationInitialization
-
Methods inherited from interface org.cyclos.impl.BaseApplicationInitializationListener
applicationInitializationPriority, getInitializationId
-
Methods inherited from interface org.cyclos.impl.utils.tasks.RecurringTaskHandler
getTaskDelays, scheduleAwake
-
-
-
-
Method Detail
-
awakeNow
void awakeNow(RecurringTask recurringTask)
Awakes the givenRecurringTask'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 theRecurringTask, which runs in a separated DB transaction.
-
getFirstExecution
Date getFirstExecution(RecurringTask task)
Returns the time for the first execution of a task.
-
getNextExecution
Date getNextExecution(RecurringTask task)
Returns the next time the task should be executed.
-
getRunningTasks
Set<RunningTaskDescriptor> getRunningTasks()
Returns an unmodifiable view with information about the recurring tasks that are currently running.
-
getTask
<T extends RecurringTask> T getTask(Class<T> recurringTaskType)
Returns aRecurringTaskby class
-
onTaskFinished
void onTaskFinished(RecurringTask recurringTask)
Indicates that the task has finished executing
-
onTaskStarted
void onTaskStarted(RecurringTask recurringTask)
Indicates that the task has started executing
-
scheduleTasks
void scheduleTasks()
Schedules the tasks to be executed- See Also:
ClusterHandler.starTaskTimers()
-
-