Interface Scheduler.Task

Enclosing interface:
Scheduler

public static interface Scheduler.Task
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Cancels the task.
    delay(@org.jetbrains.annotations.Range(from=0L, to=2147483647L) int delay, @NotNull TimeUnit unit)
    Delays the task with the specified time.
    @Nullable ScheduledFuture<?>
    The future of the executed task.
    repeat(@org.jetbrains.annotations.Range(from=0L, to=2147483647L) int repeat, @NotNull TimeUnit unit)
    Repeats the task with the specified time.
    void
    Schedules the task.
  • Method Details

    • delay

      @NotNull @NotNull Scheduler.Task delay(@org.jetbrains.annotations.Range(from=0L, to=2147483647L) int delay, @NotNull @NotNull TimeUnit unit)
      Delays the task with the specified time.
      Parameters:
      delay - the delay in the specified unit
      unit - the time unit
      Returns:
      the current task
      Since:
      1.0.0
    • repeat

      @NotNull @NotNull Scheduler.Task repeat(@org.jetbrains.annotations.Range(from=0L, to=2147483647L) int repeat, @NotNull @NotNull TimeUnit unit)
      Repeats the task with the specified time.
      Parameters:
      repeat - the repetition in the specified unit
      unit - the time unit
      Returns:
      the current task
      Since:
      1.0.0
    • schedule

      void schedule()
      Schedules the task.
      Since:
      1.0.0
    • future

      @Nullable @Nullable ScheduledFuture<?> future()
      The future of the executed task.
      Returns:
      the future of the executed task
      Since:
      1.0.0
    • cancel

      void cancel()
      Cancels the task.
      Since:
      1.0.0