Class SoulFireScheduler

java.lang.Object
com.soulfiremc.server.SoulFireScheduler
All Implemented Interfaces:
Executor

public final class SoulFireScheduler extends Object implements Executor
Lightweight scheduler for async tasks. Used for most of the async tasks in the server, bots and plugins.
  • Constructor Details

  • Method Details

    • schedule

      public void schedule(Runnable command)
    • schedule

      public void schedule(Runnable command, long delay, TimeUnit unit)
    • scheduleAtFixedRate

      public void scheduleAtFixedRate(Runnable command, long delay, long period, TimeUnit unit)
    • scheduleWithFixedDelay

      public void scheduleWithFixedDelay(Runnable command, long delay, long period, TimeUnit unit)
    • scheduleWithDynamicDelay

      public void scheduleWithDynamicDelay(Runnable command, LongSupplier delay, TimeUnit unit)
    • drainQueue

      public void drainQueue()
    • shutdown

      public void shutdown()
    • runAsync

      public CompletableFuture<?> runAsync(Runnable command)
    • supplyAsync

      public <T> CompletableFuture<T> supplyAsync(Supplier<T> command)
    • runAsync

      public CompletableFuture<?> runAsync(Runnable command, org.slf4j.event.Level errorLevel)
    • supplyAsync

      public <T> CompletableFuture<T> supplyAsync(Supplier<T> command, org.slf4j.event.Level errorLevel)
    • blockNewTasks

      public void blockNewTasks()
    • execute

      public void execute(@NonNull Runnable command)
      Specified by:
      execute in interface Executor