java.lang.Object
io.helidon.scheduling.Scheduling.FixedRateBuilder
- All Implemented Interfaces:
Builder<Scheduling.FixedRateBuilder,,Task> Supplier<Task>
- Enclosing class:
- Scheduling
public static final class Scheduling.FixedRateBuilder
extends Object
implements Builder<Scheduling.FixedRateBuilder,Task>
Builder for task executed periodically at a fixed rate.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Build the instance from this builder.delay(long delay) Fixed rate delay between each invocation.executor(ScheduledExecutorService executorService) CustomScheduledExecutorServiceused for executing scheduled task.initialDelay(long initialDelay) Initial delay of the first invocation.Task to be scheduled for execution.
-
Method Details
-
executor
CustomScheduledExecutorServiceused for executing scheduled task.- Parameters:
executorService- custom ScheduledExecutorService- Returns:
- this builder
-
initialDelay
Initial delay of the first invocation. Time unit is by defaultTimeUnit.SECONDS, can be specified withtimeUnit().- Parameters:
initialDelay- initial delay value- Returns:
- this builder
-
delay
Fixed rate delay between each invocation. Time unit is by defaultTimeUnit.SECONDS, can be specified withtimeUnit(java.util.concurrent.TimeUnit).- Parameters:
delay- delay between each invocation- Returns:
- this builder
-
task
Task to be scheduled for execution.- Parameters:
task- scheduled for execution- Returns:
- this builder
-
timeUnit
- Parameters:
timeUnit- for interpreting delay and indelay(long)andinitialDelay(long)- Returns:
- this builder
-
build
Description copied from interface:BuilderBuild the instance from this builder.- Specified by:
buildin interfaceBuilder<Scheduling.FixedRateBuilder,Task> - Returns:
- instance of the built type
-