public enum OneShotTasksShutdownPolicy extends Enum<OneShotTasksShutdownPolicy>
CronScheduler when
CronScheduler.shutdown is called should be executed or discarded.| Enum Constant and Description |
|---|
DISCARD_DELAYED
Provided this policy,
CronScheduler.shutdown will discard
already submitted one-shot tasks whose trigger time hasn't already come. |
EXECUTE_DELAYED
Provided this policy,
CronScheduler.shutdown will not
terminate the scheduler until all already submitted one-shot tasks are executed. |
| Modifier and Type | Method and Description |
|---|---|
static OneShotTasksShutdownPolicy |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static OneShotTasksShutdownPolicy[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final OneShotTasksShutdownPolicy EXECUTE_DELAYED
CronScheduler.shutdown will not
terminate the scheduler until all already submitted one-shot tasks are executed.public static final OneShotTasksShutdownPolicy DISCARD_DELAYED
CronScheduler.shutdown will discard
already submitted one-shot tasks whose trigger time hasn't already come. The one-shot
tasks whose trigger time is earlier than or equal to the current time (with respect to
CronScheduler's time provider) will be executed anyway.public static OneShotTasksShutdownPolicy[] values()
for (OneShotTasksShutdownPolicy c : OneShotTasksShutdownPolicy.values()) System.out.println(c);
public static OneShotTasksShutdownPolicy valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is null