Enum Class JobStatus
- All Implemented Interfaces:
Serializable
,Comparable<JobStatus>
,Constable
Possible statuses for a Job.
- Since:
- 4.0.0
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionThe job has been accepted by the system via the REST API.The job has been claimed by a running agent.Job failed.Job has been initialized, but not running yet.Job cannot be run due to invalid criteria.Job has been killed.The id of the job has been reserved.The job specification has been resolved.Job is now running.Job has finished executing, and is successful. -
Method Summary
Modifier and TypeMethodDescriptionGet an unmodifiable set of all the statuses that make up a job being considered active.Get an unmodifiable set of all the statuses from which a job can be marked claimed.Get an unmodifiable set of all the statuses that make up a job being considered finished.Get an unmodifiable set of all the statuses from which a job can be marked resolved.Get an unmodifiable set of all the statuses that come before CLAIMED.boolean
Check whether the job is no longer running.static JobStatus
Returns the enum constant of this class with the specified name.static JobStatus[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
RESERVED
The id of the job has been reserved. -
RESOLVED
The job specification has been resolved. -
ACCEPTED
The job has been accepted by the system via the REST API. -
CLAIMED
The job has been claimed by a running agent. -
INIT
Job has been initialized, but not running yet. -
RUNNING
Job is now running. -
SUCCEEDED
Job has finished executing, and is successful. -
KILLED
Job has been killed. -
FAILED
Job failed. -
INVALID
Job cannot be run due to invalid criteria.
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
getActiveStatuses
Get an unmodifiable set of all the statuses that make up a job being considered active.- Returns:
- Unmodifiable set of all active statuses
-
getStatusesBeforeClaimed
Get an unmodifiable set of all the statuses that come before CLAIMED.- Returns:
- Unmodifiable set of all statuses
-
getFinishedStatuses
Get an unmodifiable set of all the statuses that make up a job being considered finished.- Returns:
- Unmodifiable set of all finished statuses
-
getResolvableStatuses
Get an unmodifiable set of all the statuses from which a job can be marked resolved.- Returns:
- Unmodifiable set of all resolvable statuses
-
getClaimableStatuses
Get an unmodifiable set of all the statuses from which a job can be marked claimed.- Returns:
- Unmodifiable set of all claimable statuses
-
isFinished
public boolean isFinished()Check whether the job is no longer running.- Returns:
- True if the job is no longer processing for one reason or another.
-