Enum Class TaskStatus

java.lang.Object
java.lang.Enum<TaskStatus>
com.loomcache.server.executor.TaskStatus
All Implemented Interfaces:
Serializable, Comparable<TaskStatus>, Constable

public enum TaskStatus extends Enum<TaskStatus>
Lifecycle states for a distributed task submitted to a DistributedExecutorService.

State transitions:

  PENDING   -> RUNNING -> COMPLETED
  PENDING   -> RUNNING -> FAILED
  PENDING   -> CANCELLED
  RUNNING   -> CANCELLED
  RUNNING   -> TIMED_OUT
  SCHEDULED -> PENDING -> RUNNING -> COMPLETED -> SCHEDULED  (recurring)
  SCHEDULED -> CANCELLED
Since:
2.0
  • Enum Constant Details

    • SCHEDULED

      public static final TaskStatus SCHEDULED
      Task is scheduled and waiting for its next execution window.
    • PENDING

      public static final TaskStatus PENDING
      Task has been submitted but not yet started execution.
    • RUNNING

      public static final TaskStatus RUNNING
      Task is currently executing on a virtual thread.
    • COMPLETED

      public static final TaskStatus COMPLETED
      Task completed successfully; result is available.
    • FAILED

      public static final TaskStatus FAILED
      Task threw an exception during execution.
    • CANCELLED

      public static final TaskStatus CANCELLED
      Task was cancelled before completion.
    • TIMED_OUT

      public static final TaskStatus TIMED_OUT
      Task exceeded its configured timeout.
  • Method Details

    • values

      public static TaskStatus[] 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 TaskStatus 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