Class PersistentTasksCustomMetadata.Builder

org.elasticsearch.persistent.PersistentTasksCustomMetadata.Builder
Enclosing class:
PersistentTasksCustomMetadata

public static class PersistentTasksCustomMetadata.Builder extends
  • Method Details

    • getLastAllocationId

      public long getLastAllocationId()
    • addTask

      public <Params extends PersistentTaskParams>  taskId,  taskName, Params params, PersistentTasksCustomMetadata.Assignment assignment)
      Adds a new task to the builder

      After the task is added its id can be found by calling {getLastAllocationId()} method.

    • reassignTask

      public  taskId, PersistentTasksCustomMetadata.Assignment assignment)
      Reassigns the task to another node
    • updateTaskState

      public  taskId, PersistentTaskState taskState)
      Updates the task state
    • removeTask

      public  taskId)
      Removes the task
    • hasTask

      public boolean hasTask( taskId)
      Checks if the task is currently present in the list
    • hasTask

      public boolean hasTask( taskId, long allocationId)
      Checks if the task is currently present in the list and has the right allocation id
    • isChanged

      public boolean isChanged()
      Returns true if any the task list was changed since the builder was created
    • build