public static class Scheduler.Options
extends java.lang.Object
Constructor and Description |
---|
Options() |
Modifier and Type | Method and Description |
---|---|
Scheduler.Options |
withFrequency(Scheduler.Policy policy,
java.time.Duration frequency)
Configure the task to execute repeatedly.
|
Scheduler.Options |
withInitialDelay(java.time.Duration delay)
How long to wait after a task has been scheduled to the first execution.
|
Scheduler.Options |
withStopOnFailure(boolean flag)
Should a repeated task stop executing if an exception propagates out of
the task? Defaults to false.
|
public Scheduler.Options withInitialDelay(java.time.Duration delay)
public Scheduler.Options withFrequency(Scheduler.Policy policy, java.time.Duration frequency)
policy
- Repetition schedulingPolicy to use for the task. See Scheduler.Policy
for the
supported options.frequency
- How frequently to repeat the execution. The interpretation of this
parameter will depend on the Scheduler.Policy
.public Scheduler.Options withStopOnFailure(boolean flag)