Interface Scheduler.TaskBuilder

Enclosing interface:
Scheduler

public static interface Scheduler.TaskBuilder
Represents a fluent interface to schedule tasks on the proxy.
  • 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 by
      unit - the unit of time for time
      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 by
      unit - the unit of time for time
      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