Interface Scheduler.TaskBuilder
-
- Enclosing interface:
- Scheduler
public static interface Scheduler.TaskBuilder
Represents a fluent interface to schedule tasks on the proxy.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Scheduler.TaskBuilder
clearDelay()
Clears the delay on this task.Scheduler.TaskBuilder
clearRepeat()
Clears the repeat interval on this task.Scheduler.TaskBuilder
delay(@org.checkerframework.common.value.qual.IntRange(from=0L) long time, @NotNull TimeUnit unit)
Specifies that the task should delay its execution by the specified amount of time.default Scheduler.TaskBuilder
delay(@NotNull Duration duration)
Specifies that the task should delay its execution by the specified amount of time.Scheduler.TaskBuilder
repeat(@org.checkerframework.common.value.qual.IntRange(from=0L) long time, @NotNull TimeUnit unit)
Specifies that the task should continue running after waiting for the specified amount, until it is cancelled.default Scheduler.TaskBuilder
repeat(@NotNull Duration duration)
Specifies that the task should continue running after waiting for the specified amount, until it is cancelled.ScheduledTask
schedule()
Schedules this task for execution.
-
-
-
Method Detail
-
delay
Scheduler.TaskBuilder delay(@org.checkerframework.common.value.qual.IntRange(from=0L) long time, @NotNull @NotNull TimeUnit unit)
Specifies that the task should delay its execution by the specified amount of time.- Parameters:
time
- the time to delay byunit
- the unit of time fortime
- Returns:
- this builder, for chaining
-
delay
default Scheduler.TaskBuilder delay(@NotNull @NotNull Duration duration)
Specifies that the task should delay its execution by the specified amount of time.- Parameters:
duration
- the duration of the delay- Returns:
- this builder, for chaining
-
repeat
Scheduler.TaskBuilder repeat(@org.checkerframework.common.value.qual.IntRange(from=0L) long time, @NotNull @NotNull TimeUnit unit)
Specifies that the task should continue running after waiting for the specified amount, until it is cancelled.- Parameters:
time
- the time to delay byunit
- the unit of time fortime
- Returns:
- this builder, for chaining
-
repeat
default Scheduler.TaskBuilder repeat(@NotNull @NotNull Duration duration)
Specifies that the task should continue running after waiting for the specified amount, until it is cancelled.- Parameters:
duration
- the duration of the delay- Returns:
- this builder, for chaining
-
clearDelay
Scheduler.TaskBuilder clearDelay()
Clears the delay on this task.- Returns:
- this builder, for chaining
-
clearRepeat
Scheduler.TaskBuilder clearRepeat()
Clears the repeat interval on this task.- Returns:
- this builder, for chaining
-
schedule
ScheduledTask schedule()
Schedules this task for execution.- Returns:
- the scheduled task
-
-