Interface Scheduler
-
public interface SchedulerRepresents a scheduler to execute tasks on the proxy.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceScheduler.TaskBuilderRepresents a fluent interface to schedule tasks on the proxy.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Scheduler.TaskBuilderbuildTask(@NotNull Object plugin, @NotNull Runnable runnable)Initializes a newScheduler.TaskBuilderfor creating a task on the proxy.Scheduler.TaskBuilderbuildTask(@NotNull Object plugin, @NotNull Consumer<ScheduledTask> consumer)Initializes a newScheduler.TaskBuilderfor creating a task on the proxy.@NotNull Collection<ScheduledTask>tasksByPlugin(@NotNull Object plugin)Get theScheduledTaskfor a specific plugin.
-
-
-
Method Detail
-
buildTask
Scheduler.TaskBuilder buildTask(@NotNull @NotNull Object plugin, @NotNull @NotNull Runnable runnable)
Initializes a newScheduler.TaskBuilderfor creating a task on the proxy.- Parameters:
plugin- the plugin to request the task forrunnable- the task to run when scheduled- Returns:
- the task builder
-
buildTask
Scheduler.TaskBuilder buildTask(@NotNull @NotNull Object plugin, @NotNull @NotNull Consumer<ScheduledTask> consumer)
Initializes a newScheduler.TaskBuilderfor creating a task on the proxy.- Parameters:
plugin- the plugin to request the task forconsumer- the task to be run when scheduled with the capacity to cancel itself- Returns:
- the task builder
-
tasksByPlugin
@NotNull @NotNull Collection<ScheduledTask> tasksByPlugin(@NotNull @NotNull Object plugin)
Get theScheduledTaskfor a specific plugin.- Parameters:
plugin- the plugin object- Returns:
- the list of
ScheduledTaskcorresponding to a specific plugin
-
-