Package eu.sculkpowered.server.scheduler
Interface Scheduler.Task
- Enclosing interface:
Scheduler
public static interface Scheduler.Task
-
Method Summary
Modifier and TypeMethodDescriptionvoid
cancel()
Cancels the task.@NotNull Scheduler.Task
Delays the task with the specified time.@Nullable ScheduledFuture
<?> future()
The future of the executed task.@NotNull Scheduler.Task
repeat
(@org.jetbrains.annotations.Range(from=0L, to=2147483647L) int repeat, @NotNull TimeUnit unit) Repeats the task with the specified time.void
schedule()
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 unitunit
- 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 unitunit
- the time unit- Returns:
- the current task
- Since:
- 1.0.0
-
schedule
void schedule()Schedules the task.- Since:
- 1.0.0
-
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
-