java.lang.Object
ml.karmaconfigs.api.common.timer.scheduler.Scheduler
Direct Known Subclasses:
AsyncScheduler, SyncScheduler

public abstract class Scheduler extends Object
Karma scheduler
  • Constructor Details

    • Scheduler

      public Scheduler()
  • Method Details

    • onTaskStart

      public abstract void onTaskStart(Consumer<Integer> paramConsumer)
      Action to perform when a task has been started
      Parameters:
      paramConsumer - the action to perform
    • onTaskComplete

      public abstract void onTaskComplete(Consumer<Integer> paramConsumer)
      Action to perform when a task has been completed
      Parameters:
      paramConsumer - the action to perform
    • queue

      public abstract int queue(Runnable paramRunnable)
      Queue another task to the scheduler
      Parameters:
      paramRunnable - the task to perform
      Returns:
      the task id
    • currentTask

      public abstract int currentTask()
      Get the current task id
      Returns:
      the current task id