Class TaskManagerImpl

java.lang.Object
org.infinispan.tasks.impl.TaskManagerImpl
All Implemented Interfaces:
TaskManager

public class TaskManagerImpl extends Object implements TaskManager
TaskManagerImpl.
Since:
8.1
Author:
Tristan Tarrant
  • Constructor Details

    • TaskManagerImpl

      public TaskManagerImpl()
  • Method Details

    • start

      public void start()
    • registerTaskEngine

      public void registerTaskEngine(TaskEngine engine)
      Description copied from interface: TaskManager
      Registers a new TaskEngine
      Specified by:
      registerTaskEngine in interface TaskManager
      Parameters:
      engine - an instance of the task engine that has to be registered with the task manager
    • runTask

      public <T> CompletionStage<T> runTask(String name, org.infinispan.tasks.TaskContext context)
      Description copied from interface: TaskManager
      Executes the named task, passing an optional cache and a map of named parameters.
      Specified by:
      runTask in interface TaskManager
      Returns:
    • getCurrentTasks

      public List<TaskExecution> getCurrentTasks()
      Description copied from interface: TaskManager
      Retrieves the currently executing tasks. If running in a cluster this operation will return all of the tasks running on all nodes
      Specified by:
      getCurrentTasks in interface TaskManager
      Returns:
      a list of TaskExecution elements
    • getEngines

      public List<TaskEngine> getEngines()
      Description copied from interface: TaskManager
      Retrieves the installed task engines
      Specified by:
      getEngines in interface TaskManager
    • getTasks

      public List<org.infinispan.tasks.Task> getTasks()
      Description copied from interface: TaskManager
      Retrieves the list of all available tasks
      Specified by:
      getTasks in interface TaskManager
      Returns:
      a list of Task elements
    • getTasksAsync

      public CompletionStage<List<org.infinispan.tasks.Task>> getTasksAsync()
      Description copied from interface: TaskManager
      Same as TaskManager.getTasks() except that the tasks are returned in a non blocking fashion.
      Specified by:
      getTasksAsync in interface TaskManager
      Returns:
      a stage that when complete contains all the tasks available
    • getUserTasks

      public List<org.infinispan.tasks.Task> getUserTasks()
      Specified by:
      getUserTasks in interface TaskManager
      Returns:
      Retrieves the list of all available tasks, excluding administrative tasks with names starting with '@@'
    • getUserTasksAsync

      public CompletionStage<List<org.infinispan.tasks.Task>> getUserTasksAsync()
      Description copied from interface: TaskManager
      Same as TaskManager.getTasks() except that the user tasks are returned in a non
      Specified by:
      getUserTasksAsync in interface TaskManager
      Returns:
      a stage that when complete contains all the user tasks available