Enum BackgroundJobInfo.State

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      ABORTED
      The job was aborted before it could complete its work.
      ABORTING
      The cancellation of the job has been requested, but the implementation has not yet acted upon this request.
      ABORTING_STARTING
      The job enteres this stage when it is aborted during STARTING.
      FAILED
      The execution of the job raised an uncaught exception.
      RUNNING
      The job is currently executing.
      SCHEDULED
      The job is scheduled but has not started yet.
      STARTING
      The job is about to enter RUNNING.
      SUCCEEDED
      The work is complete.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static BackgroundJobInfo.State valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static BackgroundJobInfo.State[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

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

      • 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.
      • FAILED

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

      • values

        public static BackgroundJobInfo.State[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (BackgroundJobInfo.State c : BackgroundJobInfo.State.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static BackgroundJobInfo.State valueOf​(java.lang.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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null