public interface ServerTask<V> extends Callable<V>
getName()
Before the execution, TaskContext
is injected into the task to provide
Cache
, Marshaller
and parameters.
Author: Michal Szynkiewicz, michal.l.szynkiewicz@gmail.com
Date: 1/19/16
Time: 2:18 PMModifier and Type | Method and Description |
---|---|
default Optional<String> |
getAllowedRole()
An optional role, for which the task is accessible.
|
default TaskExecutionMode |
getExecutionMode()
Provides info whether the task execution should be local - on one node or distributed - on all nodes.
|
String |
getName()
Provides a name for the task.
|
default Set<String> |
getParameters()
The named parameters accepted by this 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
|
void setTaskContext(TaskContext taskContext)
taskContext
- task execution contextString getName()
default TaskExecutionMode getExecutionMode()
TaskExecutionMode.ONE_NODE
for single node execution, TaskExecutionMode.ALL_NODES
for distributed execution,default Optional<String> getAllowedRole()
Copyright © 2018 JBoss, a division of Red Hat. All rights reserved.