Class SchedulerSameThreadImpl

java.lang.Object
dev.rollczi.litecommands.scheduler.SchedulerSameThreadImpl
All Implemented Interfaces:
Scheduler

public class SchedulerSameThreadImpl extends Object implements Scheduler
  • Constructor Details

    • SchedulerSameThreadImpl

      public SchedulerSameThreadImpl()
  • Method Details

    • supplyLater

      public <T> CompletableFuture<T> supplyLater(SchedulerPoll type, Duration delay, ThrowingSupplier<T,Throwable> supplier)
      Description copied from interface: Scheduler
      Runs the supplier in the specified thread after the specified delay
      Specified by:
      supplyLater in interface Scheduler
      Type Parameters:
      T - the supplier return type
      Parameters:
      type - the thread type
      delay - the delay
      supplier - the supplier to run
      Returns:
      the supplier result
    • shutdown

      public void shutdown()
      Specified by:
      shutdown in interface Scheduler