Package org.cyclos.impl.utils.tasks
Interface BackgroundTaskHandler
-
- All Known Subinterfaces:
BackgroundTaskHandlerImplementor
public interface BackgroundTaskHandlerHandles the execution ofBackgroundTasks
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CustomBackgroundTaskSchedulingcustom(String internalName, String context)Returns a newCustomBackgroundTaskSchedulingwhich is used to schedule a custom background taskCustomBackgroundTaskSchedulingcustom(String internalName, String context, Long forkJoinId)Returns a newCustomBackgroundTaskSchedulingwhich is used to schedule a custom background task, referencing a fork/join execution by id.booleanisScheduledOrRunning(Class<? extends BackgroundTask> type, Object context)Returns whether the given background task type, with the given context, is either scheduled for execution or currently runningLongnewForkJoin(long taskCount, String joinCode, String... libraryInternalNames)Creates a new Fork/Join process, which executes a custom script code after a given number of tasks finish.booleanremove(Long id)Removes the scheduled task execution with the given idLongschedule(BackgroundTaskScheduling task)Schedule aBackgroundTaskto run
-
-
-
Method Detail
-
custom
CustomBackgroundTaskScheduling custom(String internalName, String context)
Returns a newCustomBackgroundTaskSchedulingwhich is used to schedule a custom background task
-
custom
CustomBackgroundTaskScheduling custom(String internalName, String context, Long forkJoinId)
Returns a newCustomBackgroundTaskSchedulingwhich is used to schedule a custom background task, referencing a fork/join execution by id.
-
isScheduledOrRunning
boolean isScheduledOrRunning(Class<? extends BackgroundTask> type, Object context)
Returns whether the given background task type, with the given context, is either scheduled for execution or currently running
-
newForkJoin
Long newForkJoin(long taskCount, String joinCode, String... libraryInternalNames)
Creates a new Fork/Join process, which executes a custom script code after a given number of tasks finish. The script code may reference libraries by internal name
-
remove
boolean remove(Long id)
Removes the scheduled task execution with the given id
-
schedule
Long schedule(BackgroundTaskScheduling task)
Schedule aBackgroundTaskto run
-
-