Promotion background
Easter Season IS HERE!
10% off limited time offer!
Ends in
00
H
00
M
00
S
limited time offer SAVE 10% NOW →
Packages com.phoenixplugins.sdk.api scheduler
com.phoenixplugins.sdk.api.scheduler

Interface Scheduler



  • public interface Scheduler
    Manages the scheduling and execution of tasks.
    • Method Summary

      Modifier and Type Method and Description
      <T> Future<T> callSyncMethod(Callable<T> task)
      Calls a method on the main thread and returns a Future object.
      Task runAsync(Runnable task)
      Schedule a task to be executed asynchronously.
      Task runAsync(Runnable task, long delay)
      Schedules a task to be executed asynchronously after the specified delay is up.
      Task runSync(Runnable task)
      Schedule a task to be executed synchronously.
      Task runSync(Runnable task, long delay)
      Schedules a task to be executed synchronously after the specified delay is up.
      Task scheduleAsync(Runnable task, long delay, long period)
      Schedules a task to be executed asynchronously after the specified delay is up.
      Task scheduleSync(Runnable task, long delay, long period)
      Schedules a task to be executed asynchronously after the specified delay is up.
    • Method Detail

      • runSync

        Task runSync(Runnable task)
        Schedule a task to be executed synchronously. The task will commence running as soon as this method returns.
        Parameters:
        task - the task to run
        Returns:
        the scheduled task
      • runSync

        Task runSync(Runnable task,
                     long delay)
        Schedules a task to be executed synchronously after the specified delay is up.
        Parameters:
        task - the task to run
        delay - the delay before this task will be executed (tick units)
        Returns:
        the scheduled task
      • runAsync

        Task runAsync(Runnable task)
        Schedule a task to be executed asynchronously. The task will commence running as soon as this method returns.
        Parameters:
        task - the task to run
        Returns:
        the scheduled task
      • runAsync

        Task runAsync(Runnable task,
                      long delay)
        Schedules a task to be executed asynchronously after the specified delay is up.
        Parameters:
        task - the task to run
        delay - the delay before this task will be executed (tick units)
        Returns:
        the scheduled task
      • scheduleSync

        Task scheduleSync(Runnable task,
                          long delay,
                          long period)
        Schedules a task to be executed asynchronously after the specified delay is up. The scheduled task will continue running at the specified interval. The interval will not begin to count down until the last task invocation is complete.
        Parameters:
        task - the task to run
        delay - the delay before this task will be executed
        period - the interval before subsequent executions of this task
        Returns:
        the scheduled task
      • scheduleAsync

        Task scheduleAsync(Runnable task,
                           long delay,
                           long period)
        Schedules a task to be executed asynchronously after the specified delay is up. The scheduled task will continue running at the specified interval. The interval will not begin to count down until the last task invocation is complete.
        Parameters:
        task - the task to run
        delay - the delay before this task will be executed
        period - the interval before subsequent executions of this task
        Returns:
        the scheduled task
      • callSyncMethod

        <T> Future<T> callSyncMethod(Callable<T> task)
        Calls a method on the main thread and returns a Future object. This task will be executed by the main server thread.
        • Note: The Future.get() methods must NOT be called from the main thread.
        • Note2: There is at least an average of 10ms latency until the isDone() method returns true.
        Type Parameters:
        T - The callable's return type
        Parameters:
        task - Task to be executed
        Returns:
        Future Future object related to the task
Last updated about 5 hours ago
My Cart (0 items)

Oops... looks like the spiders padded through here

Add products to your cart and remove them from here Lets buy
This site uses cookies to personalize content, enhance your experience. By continuing, you agree to our cookie use. Learn more