| Modifier and Type | Method and Description |
|---|---|
default <T> Promise<T> |
call(Callable<T> callable)
Compute the result of the passed callable.
|
default <T> Promise<T> |
callLater(Callable<T> callable,
long delayTicks)
Compute the result of the passed callable at some point in the future
|
default <T> Promise<T> |
callLater(Callable<T> callable,
long delay,
TimeUnit unit)
Compute the result of the passed callable at some point in the future
|
ThreadContext |
getContext()
Gets the context this scheduler operates in.
|
default Promise<Void> |
run(Runnable runnable)
Execute the passed runnable
|
default Promise<Void> |
runLater(Runnable runnable,
long delayTicks)
Execute the passed runnable at some point in the future
|
default Promise<Void> |
runLater(Runnable runnable,
long delay,
TimeUnit unit)
Execute the passed runnable at some point in the future
|
Task |
runRepeating(Consumer<Task> consumer,
long delayTicks,
long intervalTicks)
Schedule a repeating task to run
|
Task |
runRepeating(Consumer<Task> consumer,
long delay,
TimeUnit delayUnit,
long interval,
TimeUnit intervalUnit)
Schedule a repeating task to run
|
default Task |
runRepeating(Runnable runnable,
long delayTicks,
long intervalTicks)
Schedule a repeating task to run
|
default Task |
runRepeating(Runnable runnable,
long delay,
TimeUnit delayUnit,
long interval,
TimeUnit intervalUnit)
Schedule a repeating task to run
|
default <T> Promise<T> |
supply(Supplier<T> supplier)
Compute the result of the passed supplier.
|
default <T> Promise<T> |
supplyLater(Supplier<T> supplier,
long delayTicks)
Compute the result of the passed supplier at some point in the future
|
default <T> Promise<T> |
supplyLater(Supplier<T> supplier,
long delay,
TimeUnit unit)
Compute the result of the passed supplier at some point in the future
|
@Nonnull ThreadContext getContext()
@Nonnull default <T> Promise<T> supply(@Nonnull Supplier<T> supplier)
T - the return typesupplier - the supplier@Nonnull default <T> Promise<T> call(@Nonnull Callable<T> callable)
T - the return typecallable - the callable@Nonnull default Promise<Void> run(@Nonnull Runnable runnable)
runnable - the runnable@Nonnull default <T> Promise<T> supplyLater(@Nonnull Supplier<T> supplier, long delayTicks)
T - the return typesupplier - the supplierdelayTicks - the delay in ticks before calling the supplier@Nonnull default <T> Promise<T> supplyLater(@Nonnull Supplier<T> supplier, long delay, @Nonnull TimeUnit unit)
T - the return typesupplier - the supplierdelay - the delay to wait before calling the supplierunit - the unit of delay@Nonnull default <T> Promise<T> callLater(@Nonnull Callable<T> callable, long delayTicks)
T - the return typecallable - the callabledelayTicks - the delay in ticks before calling the supplier@Nonnull default <T> Promise<T> callLater(@Nonnull Callable<T> callable, long delay, @Nonnull TimeUnit unit)
T - the return typecallable - the callabledelay - the delay to wait before calling the supplierunit - the unit of delay@Nonnull default Promise<Void> runLater(@Nonnull Runnable runnable, long delayTicks)
runnable - the runnabledelayTicks - the delay in ticks before calling the supplier@Nonnull default Promise<Void> runLater(@Nonnull Runnable runnable, long delay, @Nonnull TimeUnit unit)
runnable - the runnabledelay - the delay to wait before calling the supplierunit - the unit of delay@Nonnull Task runRepeating(@Nonnull Consumer<Task> consumer, long delayTicks, long intervalTicks)
consumer - the task to rundelayTicks - the delay before the task beginsintervalTicks - the interval at which the task will repeat@Nonnull Task runRepeating(@Nonnull Consumer<Task> consumer, long delay, @Nonnull TimeUnit delayUnit, long interval, @Nonnull TimeUnit intervalUnit)
consumer - the task to rundelay - the delay before the task beginsdelayUnit - the unit of delayinterval - the interval at which the task will repeatintervalUnit - the@Nonnull default Task runRepeating(@Nonnull Runnable runnable, long delayTicks, long intervalTicks)
runnable - the task to rundelayTicks - the delay before the task beginsintervalTicks - the interval at which the task will repeat@Nonnull default Task runRepeating(@Nonnull Runnable runnable, long delay, @Nonnull TimeUnit delayUnit, long interval, @Nonnull TimeUnit intervalUnit)
runnable - the task to rundelay - the delay before the task beginsdelayUnit - the unit of delayinterval - the interval at which the task will repeatintervalUnit - theCopyright © 2020. All rights reserved.