Package org.infinispan.tasks
Interface TaskManager
-
public interface TaskManager
TaskManager. 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<Task>
getTasks()
Retrieves the list of all available tasksvoid
registerTaskEngine(TaskEngine taskEngine)
Registers a newTaskEngine
<T> CompletableFuture<T>
runTask(String taskName, TaskContext context)
Executes the named task, passing an optional cache and a map of named parameters.
-
-
-
Method Detail
-
runTask
<T> CompletableFuture<T> runTask(String taskName, 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
TaskExecution
elements
-
getEngines
List<TaskEngine> getEngines()
Retrieves the installed task engines
-
getTasks
List<Task> getTasks()
Retrieves the list of all available tasks- Returns:
- a list of
Task
elements
-
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
-
-