Package org.infinispan.tasks
Interface TaskManager
-
- All Known Implementing Classes:
TaskManagerImpl
public interface TaskManagerTaskManager. Allows executing tasks and retrieving the list of currently running tasks- Since:
- 8.1
- Author:
- Tristan Tarrant
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<TaskExecution>getCurrentTasks()Retrieves the currently executing tasks.List<TaskEngine>getEngines()Retrieves the installed task enginesList<org.infinispan.tasks.Task>getTasks()Retrieves the list of all available tasksCompletionStage<List<org.infinispan.tasks.Task>>getTasksAsync()Same asgetTasks()except that the tasks are returned in a non blocking fashion.List<org.infinispan.tasks.Task>getUserTasks()CompletionStage<List<org.infinispan.tasks.Task>>getUserTasksAsync()Same asgetTasks()except that the user tasks are returned in a nonvoidregisterTaskEngine(TaskEngine taskEngine)Registers a newTaskEngine<T> CompletionStage<T>runTask(String taskName, org.infinispan.tasks.TaskContext context)Executes the named task, passing an optional cache and a map of named parameters.
-
-
-
Method Detail
-
runTask
<T> CompletionStage<T> runTask(String taskName, org.infinispan.tasks.TaskContext context)
Executes the named task, passing an optional cache and a map of named parameters.- Parameters:
taskName-context-- Returns:
-
getCurrentTasks
List<TaskExecution> getCurrentTasks()
Retrieves the currently executing tasks. If running in a cluster this operation will return all of the tasks running on all nodes- Returns:
- a list of
TaskExecutionelements
-
getEngines
List<TaskEngine> getEngines()
Retrieves the installed task engines
-
getTasks
List<org.infinispan.tasks.Task> getTasks()
Retrieves the list of all available tasks- Returns:
- a list of
Taskelements
-
getTasksAsync
CompletionStage<List<org.infinispan.tasks.Task>> getTasksAsync()
Same asgetTasks()except that the tasks are returned in a non blocking fashion.- Returns:
- a stage that when complete contains all the tasks available
-
getUserTasks
List<org.infinispan.tasks.Task> getUserTasks()
- Returns:
- Retrieves the list of all available tasks, excluding administrative tasks with names starting with '@@'
-
getUserTasksAsync
CompletionStage<List<org.infinispan.tasks.Task>> getUserTasksAsync()
Same asgetTasks()except that the user tasks are returned in a non- Returns:
- a stage that when complete contains all the user tasks available
-
registerTaskEngine
void registerTaskEngine(TaskEngine taskEngine)
Registers a newTaskEngine- Parameters:
taskEngine- an instance of the task engine that has to be registered with the task manager
-
-