- java.lang.Object
-
- java.lang.Enum<CronJob.Executor>
-
- com.aoapps.cron.CronJob.Executor
-
- All Implemented Interfaces:
Serializable,Comparable<CronJob.Executor>
- Enclosing interface:
- CronJob
public static enum CronJob.Executor extends Enum<CronJob.Executor>
The various executors that may be selected to run this job.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description PER_PROCESSORSEQUENTIALThis job will be executed on the main cron daemon thread.UNBOUNDED
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static CronJob.ExecutorvalueOf(String name)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 Detail
-
PER_PROCESSOR
public static final CronJob.Executor PER_PROCESSOR
- See Also:
Executors.getPerProcessor()
-
SEQUENTIAL
public static final CronJob.Executor 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:
Executors.getSequential()
-
UNBOUNDED
public static final CronJob.Executor UNBOUNDED
- See Also:
Executors.getUnbounded()
-
-
Method Detail
-
values
public static CronJob.Executor[] 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 (CronJob.Executor c : CronJob.Executor.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static CronJob.Executor 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
-
-