Class TaskScheduler


  • public class TaskScheduler
    extends Object
    • Constructor Detail

      • TaskScheduler

        public TaskScheduler​(String name)
    • Method Detail

      • start

        public void start()
      • pauseAll

        public void pauseAll()
      • resumeAll

        public void resumeAll()
      • scheduleTask

        public boolean scheduleTask​(TaskDescription taskDescription)
      • shutDown

        public void shutDown()
      • isInitialized

        public boolean isInitialized()
      • isTaskSchedulerInitialized

        public boolean isTaskSchedulerInitialized()
      • deleteTask

        public void deleteTask​(String name,
                               String group)
      • resumeTask

        public boolean resumeTask​(String name)
        Resumes a specified task.
        Parameters:
        name - The name of the task to resume.
        Returns:
        true if the task was successfully resumed; false if the task scheduler is not initialized or if the task resumption fails.
      • pauseTask

        public boolean pauseTask​(String name)
        Pauses a specified task.
        Parameters:
        name - The name of the task to resume.
        Returns:
        true if the task was successfully paused; false if the task scheduler is not initialized or if the task could not be paused.
      • getRunningTaskCount

        public int getRunningTaskCount()
      • isTaskAlreadyRunning

        public boolean isTaskAlreadyRunning​(Object taskKey)
      • isTaskDeactivated

        public boolean isTaskDeactivated​(String name)
        Checks if a task with the specified name is deactivated.
        Parameters:
        name - the name of the task to check.
        Returns:
        true if the task is deactivated, false otherwise or if the scheduler is not initialized.
      • setTriggerFactory

        public void setTriggerFactory​(Object triggerFactory)
      • setJobDetailFactory

        public void setJobDetailFactory​(Object jobDetailFactory)