| Package | Description |
|---|---|
| me.lucko.helper | |
| me.lucko.helper.messaging.util | |
| me.lucko.helper.promise | |
| me.lucko.helper.scheduler | |
| me.lucko.helper.scheduler.builder |
| Modifier and Type | Method and Description |
|---|---|
static Scheduler |
Schedulers.get(ThreadContext context)
Gets a scheduler for the given context.
|
| Modifier and Type | Method and Description |
|---|---|
static <T> ChannelPublisher<T> |
ChannelPublisher.create(Channel<T> channel,
long duration,
TimeUnit unit,
ThreadContext threadContext,
Supplier<? extends T> supplier)
Creates a new channel publisher.
|
| Modifier and Type | Method and Description |
|---|---|
static ThreadContext |
ThreadContext.forCurrentThread() |
static ThreadContext |
ThreadContext.forThread(Thread thread) |
static ThreadContext |
ThreadContext.valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ThreadContext[] |
ThreadContext.values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
| Modifier and Type | Method and Description |
|---|---|
default Promise<V> |
Promise.exceptionally(ThreadContext context,
Function<Throwable,? extends V> fn)
Returns a new Promise that, when this promise completes normally, is
executed with this promise's exception as the argument to the given
function.
|
default Promise<V> |
Promise.exceptionallyDelayed(ThreadContext context,
Function<Throwable,? extends V> fn,
long delayTicks)
Returns a new Promise that, when this promise completes normally, is
executed with this promise's exception as the argument to the given
function, after the delay has elapsed.
|
default Promise<V> |
Promise.exceptionallyDelayed(ThreadContext context,
Function<Throwable,? extends V> fn,
long delay,
TimeUnit unit)
Returns a new Promise that, when this promise completes normally, is
executed with this promise's exception as the argument to the given
function, after the delay has elapsed.
|
default Promise<V> |
Promise.supply(ThreadContext context,
Supplier<V> supplier)
Schedules the supply of the Promise's result, via the given supplier.
|
default Promise<V> |
Promise.supplyDelayed(ThreadContext context,
Supplier<V> supplier,
long delayTicks)
Schedules the supply of the Promise's result, via the given supplier,
after the delay has elapsed.
|
default Promise<V> |
Promise.supplyDelayed(ThreadContext context,
Supplier<V> supplier,
long delay,
TimeUnit unit)
Schedules the supply of the Promise's result, via the given supplier,
after the delay has elapsed.
|
default Promise<V> |
Promise.supplyExceptionally(ThreadContext context,
Callable<V> callable)
Schedules the supply of the Promise's result, via the given callable.
|
default Promise<V> |
Promise.supplyExceptionallyDelayed(ThreadContext context,
Callable<V> callable,
long delayTicks)
Schedules the supply of the Promise's result, via the given callable,
after the delay has elapsed.
|
default Promise<V> |
Promise.supplyExceptionallyDelayed(ThreadContext context,
Callable<V> callable,
long delay,
TimeUnit unit)
Schedules the supply of the Promise's result, via the given callable,
after the delay has elapsed.
|
static <U> Promise<U> |
Promise.supplying(ThreadContext context,
Supplier<U> supplier)
Returns a new Promise, and schedules it's population via the given supplier.
|
static <U> Promise<U> |
Promise.supplyingDelayed(ThreadContext context,
Supplier<U> supplier,
long delayTicks)
Returns a new Promise, and schedules it's population via the given supplier,
after the delay has elapsed.
|
static <U> Promise<U> |
Promise.supplyingDelayed(ThreadContext context,
Supplier<U> supplier,
long delay,
TimeUnit unit)
Returns a new Promise, and schedules it's population via the given supplier,
after the delay has elapsed.
|
static <U> Promise<U> |
Promise.supplyingExceptionally(ThreadContext context,
Callable<U> callable)
Returns a new Promise, and schedules it's population via the given callable.
|
static <U> Promise<U> |
Promise.supplyingExceptionallyDelayed(ThreadContext context,
Callable<U> callable,
long delayTicks)
Returns a new Promise, and schedules it's population via the given callable,
after the delay has elapsed.
|
static <U> Promise<U> |
Promise.supplyingExceptionallyDelayed(ThreadContext context,
Callable<U> callable,
long delay,
TimeUnit unit)
Returns a new Promise, and schedules it's population via the given callable,
after the delay has elapsed.
|
default Promise<Void> |
Promise.thenAccept(ThreadContext context,
Consumer<? super V> action)
Returns a new Promise that, when this promise completes normally, is
executed with this promise's result as the argument to the given
action.
|
default Promise<Void> |
Promise.thenAcceptDelayed(ThreadContext context,
Consumer<? super V> action,
long delayTicks)
Returns a new Promise that, when this promise completes normally, is
executed with this promise's result as the argument to the given
action, after the delay has elapsed.
|
default Promise<Void> |
Promise.thenAcceptDelayed(ThreadContext context,
Consumer<? super V> action,
long delay,
TimeUnit unit)
Returns a new Promise that, when this promise completes normally, is
executed with this promise's result as the argument to the given
action, after the delay has elapsed.
|
default <U> Promise<U> |
Promise.thenApply(ThreadContext context,
Function<? super V,? extends U> fn)
Returns a new Promise that, when this promise completes normally, is
executed with this promise's result as the argument to the given
function.
|
default <U> Promise<U> |
Promise.thenApplyDelayed(ThreadContext context,
Function<? super V,? extends U> fn,
long delayTicks)
Returns a new Promise that, when this promise completes normally, is
executed with this promise's result as the argument to the given
function, after the delay has elapsed.
|
default <U> Promise<U> |
Promise.thenApplyDelayed(ThreadContext context,
Function<? super V,? extends U> fn,
long delay,
TimeUnit unit)
Returns a new Promise that, when this promise completes normally, is
executed with this promise's result as the argument to the given
function, after the delay has elapsed.
|
default <U> Promise<U> |
Promise.thenCompose(ThreadContext context,
Function<? super V,? extends Promise<U>> fn)
Returns a new Promise that, when this promise completes normally, is
executed with this promise's result as the argument to the given
function.
|
default <U> Promise<U> |
Promise.thenComposeDelayedSync(ThreadContext context,
Function<? super V,? extends Promise<U>> fn,
long delayTicks)
Returns a new Promise that, when this promise completes normally, is
executed with this promise's result as the argument to the given
function, after the delay has elapsed.
|
default <U> Promise<U> |
Promise.thenComposeDelayedSync(ThreadContext context,
Function<? super V,? extends Promise<U>> fn,
long delay,
TimeUnit unit)
Returns a new Promise that, when this promise completes normally, is
executed with this promise's result as the argument to the given
function, after the delay has elapsed.
|
default Promise<Void> |
Promise.thenRun(ThreadContext context,
Runnable action)
Returns a new Promise that, when this promise completes normally, executes
the given task.
|
default Promise<Void> |
Promise.thenRunDelayed(ThreadContext context,
Runnable action,
long delayTicks)
Returns a new Promise that, when this promise completes normally, executes
the given task, after the delay has elapsed.
|
default Promise<Void> |
Promise.thenRunDelayed(ThreadContext context,
Runnable action,
long delay,
TimeUnit unit)
Returns a new Promise that, when this promise completes normally, executes
the given task, after the delay has elapsed.
|
| Modifier and Type | Method and Description |
|---|---|
ThreadContext |
Scheduler.getContext()
Gets the context this scheduler operates in.
|
| Modifier and Type | Method and Description |
|---|---|
default TaskBuilder.ThreadContextual |
TaskBuilder.on(ThreadContext context)
Defines the thread context of the new task,
and returns the next builder in the chain.
|
Copyright © 2020. All rights reserved.