Interface Scheduler.TaskBuilder
- Enclosing interface:
- Scheduler
public static interface Scheduler.TaskBuilder
Represents a fluent interface to schedule tasks on the proxy.
-
Method Summary
Modifier and TypeMethodDescriptionClears the delay on this task.Clears the repeat interval on this task.Specifies that the task should delay its execution by the specified amount of time.default Scheduler.TaskBuilder
Specifies that the task should delay its execution by the specified amount of time.Specifies that the task should continue running after waiting for the specified amount, until it is cancelled.default Scheduler.TaskBuilder
Specifies that the task should continue running after waiting for the specified amount, until it is cancelled.schedule()
Schedules this task for execution.
-
Method Details
-
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
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
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
-