Enum BackgroundJobInfo.State
- java.lang.Object
-
- java.lang.Enum<BackgroundJobInfo.State>
-
- org.evolvis.tartools.backgroundjobs.BackgroundJobInfo.State
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<BackgroundJobInfo.State>
- Enclosing interface:
- BackgroundJobInfo
public static enum BackgroundJobInfo.State extends java.lang.Enum<BackgroundJobInfo.State>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ABORTEDThe job was aborted before it could complete its work.ABORTINGThe cancellation of the job has been requested, but the implementation has not yet acted upon this request.ABORTING_STARTINGThe job enteres this stage when it is aborted during STARTING.FAILEDThe execution of the job raised an uncaught exception.RUNNINGThe job is currently executing.SCHEDULEDThe job is scheduled but has not started yet.STARTINGThe job is about to enter RUNNING.SUCCEEDEDThe work is complete.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static BackgroundJobInfo.StatevalueOf(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.
-
-
-
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.
-
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 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 namejava.lang.NullPointerException- if the argument is null
-
-