Enum BackgroundJobInfo.State

java.lang.Object
java.lang.Enum<BackgroundJobInfo.State>
org.evolvis.tartools.backgroundjobs.BackgroundJobInfo.State
All Implemented Interfaces:
Serializable, Comparable<BackgroundJobInfo.State>
Enclosing interface:
BackgroundJobInfo

public static enum BackgroundJobInfo.State extends Enum<BackgroundJobInfo.State>
  • Enum Constant Details

    • SCHEDULED

      public static final BackgroundJobInfo.State SCHEDULED
      The job is scheduled but has not started yet. If aborted now, it will go directly into state ABORTED, otherwise it will eventually enter STARTING.
    • STARTING

      public static final BackgroundJobInfo.State STARTING
      The job is about to enter RUNNING. This is a somewhat delicate phase since there is no way to know whether the jvm thread executing the job has already been created or not. Once the thread is up, it will trigger the transition to RUNNING, right before executing the actual job code. If the job is aborted before that, it will transit to STARTING_ABORTING.
    • RUNNING

      public static final BackgroundJobInfo.State RUNNING
      The job is currently executing. Any uncauhgt exception will put it into state FAILED. If it completes normally, it will move to SUCCEEDED. Aborting it will put it into state ABORTING.
    • ABORTING_STARTING

      public static final BackgroundJobInfo.State ABORTING_STARTING
      The job enteres this stage when it is aborted during STARTING. No attempt will be made to stop the creation and execution of the job. Once the thread is up, it will trigger the transition to ABORTING, right before executing the actual job code.
    • ABORTING

      public static final BackgroundJobInfo.State ABORTING
      The cancellation of the job has been requested, but the implementation has not yet acted upon this request. The state will eventually change to either ABORTED or FAILED once the executing thread exits.
    • ABORTED

      public static final BackgroundJobInfo.State ABORTED
      The job was aborted before it could complete its work.
    • SUCCEEDED

      public static final BackgroundJobInfo.State SUCCEEDED
      The work is complete.
    • FAILED

      public static final BackgroundJobInfo.State FAILED
      The execution of the job raised an uncaught exception.
  • Method Details

    • values

      public static BackgroundJobInfo.State[] 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 BackgroundJobInfo.State 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