Package org.infinispan.tasks
Interface ServerTask<V>
-
public interface ServerTask<V> extends Callable<V>, Task
An interface for deployed server tasks. In order to deploy a custom ServerTask, deploy a module containing a service that implements this interface. The task will be accessible by the name returned byTask.getName()
Before the execution,TaskContext
is injected into the task to provideEmbeddedCacheManager
,Cache
,Marshaller
and parameters.- Author:
- Michal Szynkiewicz <michal.l.szynkiewicz@gmail.com>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default String
getType()
Returns the type of task.void
setTaskContext(TaskContext taskContext)
Sets the task context Store the value in your task implementation to be able to access caches and other resources in the task-
Methods inherited from interface org.infinispan.tasks.Task
getAllowedRole, getExecutionMode, getName, getParameters
-
-
-
-
Method Detail
-
setTaskContext
void setTaskContext(TaskContext taskContext)
Sets the task context Store the value in your task implementation to be able to access caches and other resources in the task- Parameters:
taskContext
- task execution context
-
-