Enum CronJob.Executor

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 Details

    • PER_PROCESSOR

      public static final CronJob.Executor PER_PROCESSOR
      Executors bounded by the number of processors present in the system. This is best used for CPU-bound tasks.
      See Also:
    • 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:
    • UNBOUNDED

      public static final CronJob.Executor UNBOUNDED
      Unbounded executors. This is more suited for I/O bound tasks.
      See Also:
  • Method Details

    • values

      public static CronJob.Executor[] 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

      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 name
      NullPointerException - if the argument is null