- All Implemented Interfaces:
Serializable
,Comparable<CronJob.Executor>
- Enclosing interface:
CronJob
The various executors that may be selected to run this job.
-
Enum Constant Summary
Enum ConstantDescriptionExecutors bounded by the number of processors present in the system.This job will be executed on the main cron daemon thread.Unbounded executors. -
Method Summary
Modifier and TypeMethodDescriptionstatic CronJob.Executor
Returns the enum constant of this type with the specified name.static CronJob.Executor[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
PER_PROCESSOR
Executors bounded by the number of processors present in the system. This is best used for CPU-bound tasks.- See Also:
-
SEQUENTIAL
This job will be executed on the main cron daemon thread. This is only appropriate for the fastest and most simple of jobs, as any job not returning quickly will stall the execution of other jobs or lock the daemon entirely.- See Also:
-
UNBOUNDED
Unbounded executors. This is more suited for I/O bound tasks.- See Also:
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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
-