Interface Task
- All Superinterfaces:
org.infinispan.commons.dataconversion.internal.JsonSerialization
- All Known Subinterfaces:
ServerTask<V>
public interface Task
extends org.infinispan.commons.dataconversion.internal.JsonSerialization
-
Method Summary
Modifier and TypeMethodDescriptionAn optional role, for which the task is accessible.default TaskExecutionModeWhether the task execution should be local - on one node or distributed - on all nodes.default TaskInstantiationModeWhether tasks should reuse a single instance or create a new instance per execution.getName()Provides a name for the task.The named parameters accepted by this taskgetType()Returns the type of task.default org.infinispan.commons.dataconversion.internal.JsontoJson()
-
Method Details
-
getName
String getName()Provides a name for the task. This is the name by which the task will be executed. Make sure the name is unique for each task.- Returns:
- name of the task
-
getType
String getType()Returns the type of task. This is dependent on the specific implementation. -
getExecutionMode
Whether the task execution should be local - on one node or distributed - on all nodes. ONE_NODE execution is the default.- Returns:
TaskExecutionMode.ONE_NODEfor single node execution,TaskExecutionMode.ALL_NODESfor distributed execution,
-
getInstantiationMode
Whether tasks should reuse a single instance or create a new instance per execution.TaskInstantiationMode.SHAREDis the default- Returns:
- TaskInstantiationMode
-
getParameters
-
getAllowedRole
-
toJson
default org.infinispan.commons.dataconversion.internal.Json toJson()- Specified by:
toJsonin interfaceorg.infinispan.commons.dataconversion.internal.JsonSerialization
-