- java.lang.Object
-
- io.helidon.scheduling.Scheduling.FixedRateBuilder
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Task
build()
Build the instance from this builder.Scheduling.FixedRateBuilder
delay(long delay)
Fixed rate delay between each invocation.Scheduling.FixedRateBuilder
executor(ScheduledExecutorService executorService)
CustomScheduledExecutorService
used for executing scheduled task.Scheduling.FixedRateBuilder
initialDelay(long initialDelay)
Initial delay of the first invocation.Scheduling.FixedRateBuilder
task(ScheduledConsumer<FixedRateInvocation> task)
Task to be scheduled for execution.Scheduling.FixedRateBuilder
timeUnit(TimeUnit timeUnit)
-
-
-
Method Detail
-
executor
public Scheduling.FixedRateBuilder executor(ScheduledExecutorService executorService)
CustomScheduledExecutorService
used for executing scheduled task.- Parameters:
executorService
- custom ScheduledExecutorService- Returns:
- this builder
-
initialDelay
public Scheduling.FixedRateBuilder initialDelay(long 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
public Scheduling.FixedRateBuilder delay(long 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
public Scheduling.FixedRateBuilder task(ScheduledConsumer<FixedRateInvocation> task)
Task to be scheduled for execution.- Parameters:
task
- scheduled for execution- Returns:
- this builder
-
timeUnit
public Scheduling.FixedRateBuilder timeUnit(TimeUnit timeUnit)
- Parameters:
timeUnit
- for interpreting delay and indelay(long)
andinitialDelay(long)
- Returns:
- this builder
-
-