Interface Task

All Superinterfaces:
All Known Subinterfaces:
All Known Implementing Classes:
AdminServerTask, CacheCreateTask, CacheGetOrCreateTask, CacheNamesTask, CacheReindexTask, CacheRemoveTask, CacheUpdateConfigurationAttributeTask, CacheUpdateIndexSchemaTask, TemplateCreateTask, TemplateNamesTask, TemplateRemoveTask

public interface Task extends JsonSerialization
  • 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.
      name of the task
    • getType

      String getType()
      Returns the type of task. This is dependent on the specific implementation.
    • getExecutionMode

      default TaskExecutionMode getExecutionMode()
      Whether the task execution should be local - on one node or distributed - on all nodes. ONE_NODE execution is the default.
      TaskExecutionMode.ONE_NODE for single node execution, TaskExecutionMode.ALL_NODES for distributed execution,
    • getInstantiationMode

      default TaskInstantiationMode getInstantiationMode()
      Whether tasks should reuse a single instance or create a new instance per execution. TaskInstantiationMode.SHARED is the default
    • getParameters

      default Set<String> getParameters()
      The named parameters accepted by this task
      a java.util.Set of parameter names
    • getAllowedRole

      default Optional<String> getAllowedRole()
      An optional role, for which the task is accessible. If the task executor has the role in the set, the task will be executed. If the role is not provided - all users can invoke the task
      a user role, for which the task can be executed
    • toJson

      default Json toJson()
      Specified by:
      toJson in interface JsonSerialization