Interface TaskManager


public interface TaskManager
  • Method Details

    • schedule

      boolean schedule(TaskDescription taskDescription)
      Schedules a task on an external task scheduler based on the parameters of the TaskDescription.
      Parameters:
      taskDescription - Contains parameters for the task scheduler. eg. target type, url, trigger parameters etc.
      Returns:
      true if the scheduling is successful, false otherwise.
    • reschedule

      boolean reschedule(String name, TaskDescription taskDescription)
    • delete

      boolean delete(String name)
    • pause

      boolean pause(String name)
    • pauseAll

      boolean pauseAll()
    • resume

      boolean resume(String name)
    • resumeAll

      boolean resumeAll()
    • getTask

      TaskDescription getTask(String name)
    • getTaskNames

      String[] getTaskNames()
    • init

      boolean init(Properties properties)
    • isInitialized

      boolean isInitialized()
    • start

      boolean start()
    • stop

      boolean stop()
    • getRunningTaskCount

      int getRunningTaskCount()
    • isTaskRunning

      boolean isTaskRunning(Object taskKey)
    • setProperties

      boolean setProperties(Map<String,Object> properties)
    • setProperty

      boolean setProperty(String name, Object property)
    • getProperty

      Object getProperty(String name)
    • setName

      void setName(String name)
    • getName

      String getName()
    • getProviderClass

      String getProviderClass()
    • getConfigurationProperties

      Properties getConfigurationProperties()
    • setConfigurationProperties

      void setConfigurationProperties(Properties properties)
    • addObserver

      void addObserver(TaskManagerObserver o)
      Adds a new Observer to the list of observers of this task manager.
      Parameters:
      o - New Observer to be registered or subscribed.
    • isTaskDeactivated

      boolean isTaskDeactivated(String taskName)
      Checks whether the Task with the given name is deactivated.
      Parameters:
      taskName - name of the Task
      Returns:
      true if the task is deactivated,false otherwise
    • isTaskBlocked

      boolean isTaskBlocked(String taskName)
      Checks whether the Task with the given name is blocked without giving the control back to the schedular.
      Parameters:
      taskName - name of the Task
      Returns:
      true if the task is blocked, false otherwise.
    • isTaskRunning

      boolean isTaskRunning(String taskName)
      Checks whether the Task with the given name is running.
      Parameters:
      taskName - name of the Task
      Returns:
      true if the task is running,false otherwise.
    • sendClusterMessage

      void sendClusterMessage(Callable<Void> task)
      Sends a cluster message, with the given Callable task in this cluster. The given Callable task is executed by all the nodes in the cluster
      Parameters:
      task - Callable task to be executed by members in the cluster.
    • isTaskExist

      boolean isTaskExist(String taskName)
      Checks whether the Task with the given name exists.
      Parameters:
      taskName - name of the Task
      Returns:
      true if the task exists, false otherwise.