Enum TaskStatus

java.lang.Object
java.lang.Enum<TaskStatus>
co.yellowdog.platform.model.TaskStatus
All Implemented Interfaces:
Serializable, Comparable<TaskStatus>, java.lang.constant.Constable

public enum TaskStatus extends Enum<TaskStatus>
Describes the status of task.
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    The task has been aborted whilst in progress.
    The task has been allocated to a worker to be executed.
    The task has been cancelled by the user.
    The task has been completed.
    The task will not be allocated as its task group has finished.
    The task inputs are being downloaded by its allocated worker.
    The task is being executed by its allocated worker.
    The task has failed.
    The task is waiting for resources to be verified.
    The task is ready to be allocated and executed.
    The task outputs are being uploaded by its allocated worker.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns true, if the task status indicates that the task is finished; otherwise, false.
    boolean
    Returns true, if the task status indicates that it is currently in progress; otherwise, false.
    boolean
    Returns true, if the task status indicates that it is waiting either for resources, or to be allocated; otherwise, false.
    static TaskStatus
    Returns the enum constant of this type with the specified name.
    static TaskStatus[]
    Returns an array containing the constants of this enum type, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • PENDING

      public static final TaskStatus PENDING
      The task is waiting for resources to be verified.
    • READY

      public static final TaskStatus READY
      The task is ready to be allocated and executed.
    • ALLOCATED

      public static final TaskStatus ALLOCATED
      The task has been allocated to a worker to be executed.
    • DOWNLOADING

      public static final TaskStatus DOWNLOADING
      The task inputs are being downloaded by its allocated worker.
    • EXECUTING

      public static final TaskStatus EXECUTING
      The task is being executed by its allocated worker.
    • UPLOADING

      public static final TaskStatus UPLOADING
      The task outputs are being uploaded by its allocated worker.
    • COMPLETED

      public static final TaskStatus COMPLETED
      The task has been completed.
    • FAILED

      public static final TaskStatus FAILED
      The task has failed.
    • ABORTED

      public static final TaskStatus ABORTED
      The task has been aborted whilst in progress.
    • CANCELLED

      public static final TaskStatus CANCELLED
      The task has been cancelled by the user.
    • DISCARDED

      public static final TaskStatus DISCARDED
      The task will not be allocated as its task group has finished.
  • 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
    • isWaiting

      public boolean isWaiting()
      Returns true, if the task status indicates that it is waiting either for resources, or to be allocated; otherwise, false.
      Returns:
      true, if the task status indicates that it is waiting either for resources, or to be allocated; otherwise, false
    • isInProgress

      public boolean isInProgress()
      Returns true, if the task status indicates that it is currently in progress; otherwise, false.
      Returns:
      true, if the task status indicates that it is currently in progress; otherwise, false
    • isFinished

      public boolean isFinished()
      Returns true, if the task status indicates that the task is finished; otherwise, false.
      Returns:
      true, if the task status indicates that the task is finished; otherwise, false