| Package | Description |
|---|---|
| me.lucko.helper | |
| me.lucko.helper.profiles | |
| me.lucko.helper.promise | |
| me.lucko.helper.scheduler |
| Modifier and Type | Method and Description |
|---|---|
static <T> Promise<T> |
Scheduler.call(ThreadContext context,
Callable<T> callable)
Call a callable
|
static <T> Promise<T> |
Scheduler.callAsync(Callable<T> callable)
Call a callable asynchronously
|
static <T> Promise<T> |
Scheduler.callLater(ThreadContext context,
Callable<T> callable,
long delay)
Call a callable at some point in the future
|
static <T> Promise<T> |
Scheduler.callLaterAsync(Callable<T> callable,
long delay)
Call a callable asynchronously at some point in the future
|
static <T> Promise<T> |
Scheduler.callLaterSync(Callable<T> callable,
long delay)
Call a callable on the main thread at some point in the future
|
static <T> Promise<T> |
Scheduler.callSync(Callable<T> callable)
Call a callable on the main server thread
|
static Promise<Void> |
Scheduler.run(ThreadContext context,
Runnable runnable)
Execute a runnable
|
static Promise<Void> |
Scheduler.runAsync(Runnable runnable)
Execute a runnable asynchronously
|
static Promise<Void> |
Scheduler.runLater(ThreadContext context,
Runnable runnable,
long delay)
Execute a runnable at some point in the future
|
static Promise<Void> |
Scheduler.runLaterAsync(Runnable runnable,
long delay)
Execute a runnable asynchronously at some point in the future
|
static Promise<Void> |
Scheduler.runLaterSync(Runnable runnable,
long delay)
Execute a runnable on the main server thread at some point in the future
|
static Promise<Void> |
Scheduler.runSync(Runnable runnable)
Execute a runnable on the main server thread
|
static <T> Promise<T> |
Scheduler.supply(ThreadContext context,
Supplier<T> supplier)
Compute the result of the passed supplier
|
static <T> Promise<T> |
Scheduler.supplyAsync(Supplier<T> supplier)
Compute the result of the passed supplier asynchronously
|
static <T> Promise<T> |
Scheduler.supplyLater(ThreadContext context,
Supplier<T> supplier,
long delay)
Compute the result of the passed supplier at some point in the future
|
static <T> Promise<T> |
Scheduler.supplyLaterAsync(Supplier<T> supplier,
long delay)
Compute the result of the passed supplier asynchronously at some point in the future
|
static <T> Promise<T> |
Scheduler.supplyLaterSync(Supplier<T> supplier,
long delay)
Compute the result of the passed supplier on the main thread at some point in the future
|
static <T> Promise<T> |
Scheduler.supplySync(Supplier<T> supplier)
Compute the result of the passed supplier on the main thread
|
| Modifier and Type | Method and Description |
|---|---|
Promise<Collection<Profile>> |
ProfileRepository.lookupKnownProfiles()
Gets a collection of profiles known to the repository.
|
Promise<Optional<Profile>> |
ProfileRepository.lookupProfile(String name)
Gets a profile from this repository, using the name as the base
for the request.
|
Promise<Profile> |
ProfileRepository.lookupProfile(UUID uniqueId)
Gets a profile from this repository, using the unique id as the base for
the request.
|
Promise<Map<UUID,Profile>> |
ProfileRepository.lookupProfiles(Iterable<UUID> uniqueIds)
Populates a map of unique id to profile for the given iterable of unique ids.
|
Promise<Map<String,Profile>> |
ProfileRepository.lookupProfilesByName(Iterable<String> names)
Populates a map of name to profile for the given iterable of names.
|
| Modifier and Type | Method and Description |
|---|---|
static <U> Promise<U> |
Promise.completed(U value)
Returns a Promise which is already completed with the given value.
|
static <U> Promise<U> |
Promise.empty()
Returns a new empty Promise
|
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.
|
static <U> Promise<U> |
Promise.exceptionally(Throwable exception)
Returns a Promise which is already completed with the given exception.
|
Promise<V> |
Promise.exceptionallyAsync(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 delay)
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.
|
Promise<V> |
Promise.exceptionallyDelayedAsync(Function<Throwable,? extends V> fn,
long delay)
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.
|
Promise<V> |
Promise.exceptionallyDelayedSync(Function<Throwable,? extends V> fn,
long delay)
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.
|
Promise<V> |
Promise.exceptionallySync(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.
|
static Promise<Void> |
Promise.start()
Returns a new base promise to be built on top of.
|
default Promise<V> |
Promise.supply(ThreadContext context,
Supplier<V> supplier)
Schedules the supply of the Promise's result, via the given supplier.
|
Promise<V> |
Promise.supply(V value)
Supplies the Promise's result.
|
Promise<V> |
Promise.supplyAsync(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 delay)
Schedules the supply of the Promise's result, via the given supplier,
after the delay has elapsed.
|
Promise<V> |
Promise.supplyDelayedAsync(Supplier<V> supplier,
long delay)
Schedules the supply of the Promise's result, via the given supplier,
after the delay has elapsed.
|
Promise<V> |
Promise.supplyDelayedSync(Supplier<V> supplier,
long delay)
Schedules the supply of the Promise's result, via the given supplier,
after the delay has elapsed.
|
Promise<V> |
Promise.supplyException(Throwable exception)
Supplies an exceptional result to the Promise.
|
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.supplyingAsync(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 delay)
Returns a new Promise, and schedules it's population via the given supplier,
after the delay has elapsed.
|
static <U> Promise<U> |
Promise.supplyingDelayedAsync(Supplier<U> supplier,
long delay)
Returns a new Promise, and schedules it's population via the given supplier,
after the delay has elapsed.
|
static <U> Promise<U> |
Promise.supplyingDelayedSync(Supplier<U> supplier,
long delay)
Returns a new Promise, and schedules it's population via the given supplier,
after the delay has elapsed.
|
static <U> Promise<U> |
Promise.supplyingSync(Supplier<U> supplier)
Returns a new Promise, and schedules it's population via the given supplier.
|
Promise<V> |
Promise.supplySync(Supplier<V> supplier)
Schedules the supply of the Promise's result, via the given supplier.
|
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.thenAcceptAsync(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 delay)
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.thenAcceptDelayedAsync(Consumer<? super V> action,
long delay)
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.thenAcceptDelayedSync(Consumer<? super V> action,
long delay)
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.thenAcceptSync(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 <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.
|
<U> Promise<U> |
Promise.thenApplyAsync(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 delay)
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.
|
<U> Promise<U> |
Promise.thenApplyDelayedAsync(Function<? super V,? extends U> fn,
long delay)
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.
|
<U> Promise<U> |
Promise.thenApplyDelayedSync(Function<? super V,? extends U> fn,
long delay)
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.
|
<U> Promise<U> |
Promise.thenApplySync(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.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.
|
<U> Promise<U> |
Promise.thenComposeAsync(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.
|
<U> Promise<U> |
Promise.thenComposeDelayedAsync(Function<? super V,? extends Promise<U>> fn,
long delay)
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.
|
<U> Promise<U> |
Promise.thenComposeDelayedSync(Function<? super V,? extends Promise<U>> fn,
long delay)
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)
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.
|
<U> Promise<U> |
Promise.thenComposeSync(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 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.thenRunAsync(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 delay)
Returns a new Promise that, when this promise completes normally, executes
the given task, after the delay has elapsed.
|
default Promise<Void> |
Promise.thenRunDelayedAsync(Runnable action,
long delay)
Returns a new Promise that, when this promise completes normally, executes
the given task, after the delay has elapsed.
|
default Promise<Void> |
Promise.thenRunDelayedSync(Runnable action,
long delay)
Returns a new Promise that, when this promise completes normally, executes
the given task, after the delay has elapsed.
|
default Promise<Void> |
Promise.thenRunSync(Runnable action)
Returns a new Promise that, when this promise completes normally, executes
the given task.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
<U> Promise<U> |
Promise.thenComposeAsync(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.
|
<U> Promise<U> |
Promise.thenComposeDelayedAsync(Function<? super V,? extends Promise<U>> fn,
long delay)
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.
|
<U> Promise<U> |
Promise.thenComposeDelayedSync(Function<? super V,? extends Promise<U>> fn,
long delay)
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)
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.
|
<U> Promise<U> |
Promise.thenComposeSync(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.
|
| Modifier and Type | Method and Description |
|---|---|
<T> Promise<T> |
ContextualPromiseBuilder.call(Callable<T> callable) |
Promise<Void> |
ContextualPromiseBuilder.run(Runnable runnable) |
<T> Promise<T> |
ContextualPromiseBuilder.supply(Supplier<T> supplier) |
Copyright © 2017. All rights reserved.