java.lang.Object
io.helidon.scheduling.Scheduling.FixedRateBuilder
- All Implemented Interfaces:
io.helidon.common.Builder<Scheduling.FixedRateBuilder,,Task> Supplier<Task>
- Enclosing class:
- Scheduling
public static final class Scheduling.FixedRateBuilder
extends Object
implements io.helidon.common.Builder<Scheduling.FixedRateBuilder,Task>
Builder for task executed periodically at a fixed rate.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()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.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.helidon.common.Builder
get, identity, update
-
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
- Specified by:
buildin interfaceio.helidon.common.Builder<Scheduling.FixedRateBuilder,Task>
-