Enum TaskStatus

java.lang.Object
java.lang.Enum<TaskStatus>
org.opensearch.task.commons.task.TaskStatus
All Implemented Interfaces:
Serializable, Comparable<TaskStatus>

@ExperimentalApi public enum TaskStatus extends Enum<TaskStatus>
Task status enum
  • Enum Constant Details

    • UNASSIGNED

      public static final TaskStatus UNASSIGNED
      TaskStatus of a Task which is not yet assigned to or picked up by a worker
    • ASSIGNED

      public static final TaskStatus ASSIGNED
      TaskStatus of a Task which is assigned to or picked up by a worker but hasn't started execution yet. This status confirms that a worker will execute this task and no other worker should pick it up.
    • ACTIVE

      public static final TaskStatus ACTIVE
      TaskStatus of an in progress Task
    • SUCCESS

      public static final TaskStatus SUCCESS
      TaskStatus of a finished Task
    • FAILED

      public static final TaskStatus FAILED
      TaskStatus of a Task which failed in 1 or more attempts
    • CANCELLED

      public static final TaskStatus CANCELLED
      TaskStatus of a cancelled Task
  • Method Details

    • values

      public static TaskStatus[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static TaskStatus valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null