Interface ContextScheduler


  • public interface ContextScheduler
    Represents a scheduling behavior.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void async​(@NonNull Runnable runnable)
      Executes an asynchronous task which will be only ran once.
      void async​(@NonNull Runnable runnable, long delay, long period)
      Executes an asynchronous repeating task every given ticks, after the given ticks delay time.
      void sync​(@NonNull Runnable runnable)
      Executes an synchronous task which will be only ran once.
      void sync​(@NonNull Runnable runnable, long delay, long period)
      Executes a synchronous repeating task every given ticks, after the given ticks delay time.
    • Method Detail

      • async

        void async​(@NonNull
                   @NonNull Runnable runnable,
                   long delay,
                   long period)
        Executes an asynchronous repeating task every given ticks, after the given ticks delay time.
        Parameters:
        runnable - The task to run
        delay - the ticks to wait before running the task for the first time
        period - the ticks to wait before each run
      • async

        void async​(@NonNull
                   @NonNull Runnable runnable)
        Executes an asynchronous task which will be only ran once.
        Parameters:
        runnable - The task to run
      • sync

        void sync​(@NonNull
                  @NonNull Runnable runnable,
                  long delay,
                  long period)
        Executes a synchronous repeating task every given ticks, after the given ticks delay time.
        Parameters:
        runnable - The task to run
        delay - the ticks to wait before running the task for the first time
        period - the ticks to wait before each run
      • sync

        void sync​(@NonNull
                  @NonNull Runnable runnable)
        Executes an synchronous task which will be only ran once.
        Parameters:
        runnable - The task to run