Class AbstractMainThreadBasedScheduler
java.lang.Object
dev.rollczi.litecommands.scheduler.AbstractMainThreadBasedScheduler
- All Implemented Interfaces:
Scheduler
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected abstract voidrunAsynchronous(Runnable task, Duration delay) protected abstract voidrunSynchronous(Runnable task, Duration delay) protected booleanrunUnknown(SchedulerType type, Duration delay, Runnable task) Run task with an unknown scheduler poll typefinal <T> CompletableFuture<T> supplyLater(SchedulerType type, Duration delay, ThrowingSupplier<T, Throwable> supplier) Runs the supplier in the specified thread after the specified delay
-
Constructor Details
-
AbstractMainThreadBasedScheduler
public AbstractMainThreadBasedScheduler()
-
-
Method Details
-
runUnknown
Run task with an unknown scheduler poll type- Returns:
- true if a task was run, false otherwise
-
runSynchronous
-
runAsynchronous
-
log