Package net.sf.basedb.core
Enum Class Job.Status
- All Implemented Interfaces:
Serializable
,Comparable<Job.Status>
,Constable
- Enclosing class:
- Job
The status of a job.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionTheSignal.ABORT
signal has been sent to the job, but it has not yet responded.The job has finished successfully.The job has finished with an error.The job is executing.The job has been paused.The job is beeing prepared for execution.The job hasn't been configured yet.The job is waiting to be started. -
Field Summary
Modifier and TypeFieldDescriptionprivate final String
private final boolean
private final int
private static final Map<Integer,
Job.Status> Maps the integer that is stored in the database. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Job.Status
fromValue
(int value) Get theJob.Status
object when you know the integer code.int
getValue()
Get the integer value that is used when storing aJob.Status
to the database.boolean
If theJob.execute(ProgressReporter, String)
method can be called when the job is in this status or not.toString()
static Job.Status
Returns the enum constant of this class with the specified name.static Job.Status[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
UNCONFIGURED
The job hasn't been configured yet. -
WAITING
The job is waiting to be started. -
PREPARED
The job is beeing prepared for execution. -
EXECUTING
The job is executing. -
ABORTING
TheSignal.ABORT
signal has been sent to the job, but it has not yet responded. -
PAUSED
The job has been paused.- Since:
- 3.11
-
DONE
The job has finished successfully. -
ERROR
The job has finished with an error.
-
-
Field Details
-
valueMapping
Maps the integer that is stored in the database. -
value
private final int value -
displayValue
-
executable
private final boolean executable
-
-
Constructor Details
-
Status
-
-
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
-
fromValue
Get theJob.Status
object when you know the integer code.- Parameters:
value
- The integer value.- Returns:
- The type object or null if the value is unknown
-
toString
- Overrides:
toString
in classEnum<Job.Status>
-
getValue
public int getValue()Get the integer value that is used when storing aJob.Status
to the database.- Returns:
- The intger value of this type
-
isExecutable
public boolean isExecutable()If theJob.execute(ProgressReporter, String)
method can be called when the job is in this status or not.
-