public class TaskContext
extends java.lang.Object
| Constructor and Description |
|---|
TaskContext() |
| Modifier and Type | Method and Description |
|---|---|
TaskContext |
addParameter(java.lang.String name,
java.lang.Object value)
Adds a named parameter to the task context
|
TaskContext |
cache(Cache<?,?> cache)
The cache against which this task will be executed.
|
TaskContext |
cacheManager(EmbeddedCacheManager cacheManager)
The cache manager with which this task should be executed
|
java.util.Optional<Cache<?,?>> |
getCache()
The default cache.
|
EmbeddedCacheManager |
getCacheManager()
CacheManager for this task execution
|
java.util.Optional<Marshaller> |
getMarshaller()
Marshaller for this task execution
|
java.util.Optional<java.util.Map<java.lang.String,?>> |
getParameters()
Gets a map of named parameters for the task
|
java.util.Optional<javax.security.auth.Subject> |
getSubject()
The optional
Subject which is executing this task |
boolean |
isLogEvent()
Whether executing this task will generate an event in the event log
|
TaskContext |
logEvent(boolean logEvent)
Whether execution will generate an event in the event log
|
TaskContext |
marshaller(Marshaller marshaller)
The marshaller with which this task should be executed
|
TaskContext |
parameters(java.util.Map<java.lang.String,?> parameters)
A map of named parameters that will be passed to the task.
|
TaskContext |
subject(javax.security.auth.Subject subject)
The subject to impersonate when running this task.
|
java.lang.String |
toString() |
public TaskContext cacheManager(EmbeddedCacheManager cacheManager)
public TaskContext marshaller(Marshaller marshaller)
public TaskContext cache(Cache<?,?> cache)
public TaskContext parameters(java.util.Map<java.lang.String,?> parameters)
public TaskContext subject(javax.security.auth.Subject subject)
Security.getSubject()public TaskContext addParameter(java.lang.String name, java.lang.Object value)
public TaskContext logEvent(boolean logEvent)
public EmbeddedCacheManager getCacheManager()
public java.util.Optional<Marshaller> getMarshaller()
public java.util.Optional<Cache<?,?>> getCache()
Cache.getCacheManager())public java.util.Optional<java.util.Map<java.lang.String,?>> getParameters()
public java.util.Optional<javax.security.auth.Subject> getSubject()
Subject which is executing this taskSubjectpublic boolean isLogEvent()
public java.lang.String toString()
toString in class java.lang.Object