Package io.jmix.flowui.backgroundtask
Interface BackgroundTaskWatchDog
- All Known Implementing Classes:
BackgroundTaskWatchDogImpl
public interface BackgroundTaskWatchDog
Interface responsible for managing background task lifecycles such as starting, managing,
removing, and terminating tasks. It acts as a central coordinator for monitoring and
controlling tasks' execution state.
-
Method Summary
Modifier and TypeMethodDescriptionvoidRemoves finished, canceled or hangup tasks.intvoidmanageTask(TaskHandlerImpl taskHandler) Adds task underBackgroundTaskWatchDogcontrol.voidremoveTask(TaskHandlerImpl taskHandler) Task completed, remove it from watches.voidStops execution of all background tasks.
-
Method Details
-
manageTask
Adds task underBackgroundTaskWatchDogcontrol.- Parameters:
taskHandler- task handler
-
removeTask
Task completed, remove it from watches.- Parameters:
taskHandler- task handler
-
cleanupTasks
void cleanupTasks()Removes finished, canceled or hangup tasks. -
stopTasks
void stopTasks()Stops execution of all background tasks. -
getActiveTasksCount
int getActiveTasksCount()- Returns:
- active tasks count
-