-
Adds a named parameter to the task context only if it is non-null
Adds a named parameter to the task context
TaskContext.cache(org.infinispan.Cache<?,?> cache)
The cache against which this task will be executed.
TaskContext.cacheManager(org.infinispan.manager.EmbeddedCacheManager cacheManager)
The cache manager with which this task should be executed
Whether execution will generate an event in the event log
TaskContext.marshaller(org.infinispan.commons.marshall.Marshaller marshaller)
The marshaller with which this task should be executed
A map of named parameters that will be passed to the task.
The subject to impersonate when running this task.
void
Sets the task context
Store the value in your task implementation to be able to access caches and other resources in the task
Note that, if
Task.getInstantiationMode() is
TaskInstantiationMode.SHARED there will be single
instance of each ServerTask on each server so, if you expect concurrent invocations of a task, the
TaskContext should be stored in a
ThreadLocal static field in your task.