Enum Class TaskState

java.lang.Object
java.lang.Enum<TaskState>
com.ultikits.ultitools.scheduling.TaskState
All Implemented Interfaces:
Serializable, Comparable<TaskState>, Constable

public enum TaskState extends Enum<TaskState>
Task lifecycle. One-shot: SCHEDULED to RUNNING to COMPLETED or FAILED, or SCHEDULED to CANCELLED or RETIRED. Repeating: SCHEDULED to RUNNING and back, ending CANCELLED or RETIRED, never FAILED. Constants may be added in a 7.x minor release. A one-shot task that has started always ends COMPLETED or FAILED: cancellation, owner unload and entity removal do not affect a run in progress.
  • Enum Constant Details

    • SCHEDULED

      public static final TaskState SCHEDULED
      Queued for its next execution.
    • RUNNING

      public static final TaskState RUNNING
      Currently executing.
    • COMPLETED

      public static final TaskState COMPLETED
      A one-shot execution returned normally.
    • FAILED

      public static final TaskState FAILED
      A one-shot execution threw.
    • CANCELLED

      public static final TaskState CANCELLED
      Future executions were cancelled, including owner unload.
    • RETIRED

      public static final TaskState RETIRED
      The owning entity was removed before execution.
  • Constructor Details

    • TaskState

      private TaskState()
  • 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