Package net.sf.basedb.core
Enum Class Job.ExecutionTime
- All Implemented Interfaces:
Serializable
,Comparable<Job.ExecutionTime>
,Constable
- Enclosing class:
- Job
A rough estimate of the execution time of a job.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Field Summary
Modifier and TypeFieldDescriptionprivate final int
private final int
private final String
private final int
private static final Map<Integer,
Job.ExecutionTime> Maps the integer that is stored in the database. -
Constructor Summary
ModifierConstructorDescriptionprivate
ExecutionTime
(int value, String displayValue, int defaultSlots, int defaultPriority) -
Method Summary
Modifier and TypeMethodDescriptionstatic Job.ExecutionTime
fromValue
(int value) Get theJob.Status
object when you know the integer code.int
The default thread priority to use when executing jobs in with this execution time.int
The default number of execution slots available for jobs with this execution time in the internal job queue.int
getValue()
Get the integer value that is used when storing aJob.ExecutionTime
in the database.toString()
static Job.ExecutionTime
Returns the enum constant of this class with the specified name.static Job.ExecutionTime[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SHORTEST
The job is fast and should not take more than a minute to execute. -
SHORT
The job shouldn't take more than 10 minutes to execute. -
MEDIUM
The job shouldn't take less than 1 hour to execute. -
LONG
The job takes more than 1 hour to execute.
-
-
Field Details
-
valueMapping
Maps the integer that is stored in the database. -
value
private final int value -
displayValue
-
defaultSlots
private final int defaultSlots -
defaultPriority
private final int defaultPriority
-
-
Constructor Details
-
ExecutionTime
-
-
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.ExecutionTime>
-
getValue
public int getValue()Get the integer value that is used when storing aJob.ExecutionTime
in the database.- Returns:
- The integer value of this type
-
getDefaultSlots
public int getDefaultSlots()The default number of execution slots available for jobs with this execution time in the internal job queue. -
getDefaultPriority
public int getDefaultPriority()The default thread priority to use when executing jobs in with this execution time.
-