Uses of Class
org.infinispan.tasks.TaskContext
Package
Description
Server tasks API.
-
Uses of TaskContext in org.infinispan.scripting
Modifier and TypeMethodDescription<T> CompletionStage<T>
ScriptingManager.runScript
(String scriptName, TaskContext context) Runs a named script using the specifiedTaskContext
-
Uses of TaskContext in org.infinispan.scripting.utils
-
Uses of TaskContext in org.infinispan.server.core.admin
Modifier and TypeMethodDescriptionfinal T
AdminServerTask.execute
(TaskContext taskContext) <T> CompletionStage<T>
AdminOperationsHandler.runTask
(String taskName, TaskContext context, BlockingManager blockingManager) -
Uses of TaskContext in org.infinispan.tasks
Modifier and TypeMethodDescriptionTaskContext.addOptionalParameter
(String name, Object value) Adds a named parameter to the task context only if it is non-nullTaskContext.addParameter
(String name, Object value) Adds a named parameter to the task contextThe cache against which this task will be executed.TaskContext.cacheManager
(EmbeddedCacheManager cacheManager) The cache manager with which this task should be executedTaskContext.logEvent
(boolean logEvent) Whether execution will generate an event in the event logTaskContext.marshaller
(Marshaller marshaller) The marshaller with which this task should be executedTaskContext.parameters
(Map<String, ?> parameters) A map of named parameters that will be passed to the task.The subject to impersonate when running this task.Modifier and TypeMethodDescriptionvoid
ServerTask.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 Note that, ifTask.getInstantiationMode()
isTaskInstantiationMode.SHARED
there will be single instance of each ServerTask on each server so, if you expect concurrent invocations of a task, theTaskContext
should be stored in aThreadLocal
static field in your task.