Enum Class TaskState

java.lang.Object
java.lang.Enum<TaskState>
org.j7m.middleware.workload.api.TaskState
All Implemented Interfaces:
Serializable, Comparable<TaskState>, Constable

public enum TaskState extends Enum<TaskState>
Stable lifecycle states for a middleware workload task.

The enum is immutable and thread-safe. State transitions are owned by a WorkloadScheduler; implementations may support only the transitions documented by that scheduler and must not claim durable or exactly-once execution semantics.

  • Enum Constant Details

    • SUBMITTED

      public static final TaskState SUBMITTED
      The scheduler accepted the task descriptor.
    • QUEUED

      public static final TaskState QUEUED
      The task is waiting for capacity or a lease owner.
    • LEASED

      public static final TaskState LEASED
      A worker owns a live task lease.
    • RUNNING

      public static final TaskState RUNNING
      A worker is actively executing the task.
    • CANCELLING

      public static final TaskState CANCELLING
      Cancellation has been requested and is being delivered.
    • CANCELLED

      public static final TaskState CANCELLED
      The task stopped because cancellation completed.
    • CHECKPOINTING

      public static final TaskState CHECKPOINTING
      A checkpoint is being recorded.
    • COMPLETED

      public static final TaskState COMPLETED
      The task completed successfully.
    • FAILED

      public static final TaskState FAILED
      The task failed with a middleware or application failure.
    • EXPIRED

      public static final TaskState EXPIRED
      The task expired before valid ownership or completion.
    • FENCED

      public static final TaskState FENCED
      The task owner used a stale fencing token.
  • Method Details

    • values

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

      public static TaskState valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null