Package org.infinispan.tasks.spi
Interface TaskEngine
- All Known Subinterfaces:
NonBlockingTaskEngine
public interface TaskEngine
TaskEngine. An implementation of an engine for executing tasks. How the tasks are implemented is
dependent on the engine itself.
- Since:
- 8.1
- Author:
- Tristan Tarrant
-
Method Summary
Modifier and TypeMethodDescriptiongetName()Returns the name of the engineList<org.infinispan.tasks.Task> getTasks()Returns the list of tasks managed by this enginebooleanReturns whether this task engine knows about a specified named task<T> CompletionStage<T> runTask(String taskName, org.infinispan.tasks.TaskContext context, org.infinispan.util.concurrent.BlockingManager blockingManager) Executes the named task on the specified cache, passing a map of named parameters.
-
Method Details
-
getName
String getName()Returns the name of the engine -
getTasks
List<org.infinispan.tasks.Task> getTasks()Returns the list of tasks managed by this engine- Returns:
-
runTask
<T> CompletionStage<T> runTask(String taskName, org.infinispan.tasks.TaskContext context, org.infinispan.util.concurrent.BlockingManager blockingManager) Executes the named task on the specified cache, passing a map of named parameters.- Parameters:
taskName- the name of the taskcontext- a task contextblockingManager- the handler for when a task is to be invoked that could block- Returns:
-
handles
Returns whether this task engine knows about a specified named task- Parameters:
taskName-- Returns:
-