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 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, TimeUnit unit)
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, TimeUnit unit)
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, 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
-
repeat
Scheduler.TaskBuilder repeat(@org.checkerframework.common.value.qual.IntRange(from=0L) long time, 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
-
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
-
-