Package net.sf.basedb.core
Enum Job.Status
- java.lang.Object
-
- java.lang.Enum<Job.Status>
-
- net.sf.basedb.core.Job.Status
-
- All Implemented Interfaces:
Serializable
,Comparable<Job.Status>
- Enclosing class:
- Job
public static enum Job.Status extends Enum<Job.Status>
The status of a job.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ABORTING
TheSignal.ABORT
signal has been sent to the job, but it has not yet responded.DONE
The job has finished successfully.ERROR
The job has finished with an error.EXECUTING
The job is executing.PAUSED
The job has been paused.PREPARED
The job is beeing prepared for execution.UNCONFIGURED
The job hasn't been configured yet.WAITING
The job is waiting to be started.
-
Field Summary
Fields Modifier and Type Field Description private String
displayValue
private boolean
executable
private int
value
private static Map<Integer,Job.Status>
valueMapping
Maps the integer that is stored in the database.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static 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
isExecutable()
If theJob.execute(ProgressReporter, String)
method can be called when the job is in this status or not.String
toString()
static Job.Status
valueOf(String name)
Returns the enum constant of this type with the specified name.static Job.Status[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
UNCONFIGURED
public static final Job.Status UNCONFIGURED
The job hasn't been configured yet.
-
WAITING
public static final Job.Status WAITING
The job is waiting to be started.
-
PREPARED
public static final Job.Status PREPARED
The job is beeing prepared for execution.
-
EXECUTING
public static final Job.Status EXECUTING
The job is executing.
-
ABORTING
public static final Job.Status ABORTING
TheSignal.ABORT
signal has been sent to the job, but it has not yet responded.
-
PAUSED
public static final Job.Status PAUSED
The job has been paused.- Since:
- 3.11
-
DONE
public static final Job.Status DONE
The job has finished successfully.
-
ERROR
public static final Job.Status ERROR
The job has finished with an error.
-
-
Field Detail
-
valueMapping
private static final Map<Integer,Job.Status> valueMapping
Maps the integer that is stored in the database.
-
value
private final int value
-
displayValue
private final String displayValue
-
executable
private final boolean executable
-
-
Constructor Detail
-
Status
private Status(int value, String displayValue, boolean executable)
-
-
Method Detail
-
values
public static Job.Status[] 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 (Job.Status c : Job.Status.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Job.Status 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 nameNullPointerException
- if the argument is null
-
fromValue
public static Job.Status fromValue(int value)
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
public String 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.
-
-