Package org.infinispan.tasks.spi
Interface TaskEngine
-
- All Known Subinterfaces:
NonBlockingTaskEngine
public interface TaskEngineTaskEngine. 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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetName()Returns the name of the engineList<org.infinispan.tasks.Task>getTasks()Returns the list of tasks managed by this enginebooleanhandles(String taskName)Returns 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 Detail
-
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
boolean handles(String taskName)
Returns whether this task engine knows about a specified named task- Parameters:
taskName-- Returns:
-
-