Interface Scheduler


public interface Scheduler
Represents a scheduler to execute tasks on the proxy.
  • Method Details

    • buildTask

      Scheduler.TaskBuilder buildTask(@NotNull @NotNull Object plugin, @NotNull @NotNull Runnable runnable)
      Initializes a new Scheduler.TaskBuilder for creating a task on the proxy.
      Parameters:
      plugin - the plugin to request the task for
      runnable - 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 new Scheduler.TaskBuilder for creating a task on the proxy.
      Parameters:
      plugin - the plugin to request the task for
      consumer - 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 the ScheduledTask for a specific plugin.
      Parameters:
      plugin - the plugin object
      Returns:
      the list of ScheduledTask corresponding to a specific plugin