default Promise<T> |
Promise.complete(@NonNull Try<? extends T> value) |
Completes this Promise with the given value.
|
default Promise<T> |
Promise.completeWith(@NonNull Future<? extends T> other) |
Completes this Promise with the result of the given Future once it is completed.
|
static <T> Promise<T> |
Promise.failed(@NonNull java.lang.Throwable exception) |
Creates a Promise that is already completed with a failure, using the
Future.DEFAULT_EXECUTOR for asynchronous operations.
|
static <T> Promise<T> |
Promise.failed(@NonNull java.util.concurrent.Executor executor,
@NonNull java.lang.Throwable exception) |
Creates a Promise that is already completed with a failure, using the specified Executor
for asynchronous operations.
|
default Promise<T> |
Promise.failure(@NonNull java.lang.Throwable exception) |
Completes this Promise with the given exception.
|
static <T> Promise<T> |
Promise.fromTry(@NonNull Try<? extends T> result) |
|
static <T> Promise<T> |
Promise.fromTry(@NonNull java.util.concurrent.Executor executor,
@NonNull Try<? extends T> result) |
Creates a Promise from the given Try, using the specified Executor
for asynchronous operations.
|
static <T> Promise<T> |
Promise.make() |
Creates a new Promise that is not yet completed, using the Future.DEFAULT_EXECUTOR
(typically ForkJoinPool.commonPool()) for asynchronous operations.
|
static <T> Promise<T> |
Promise.make(@NonNull java.util.concurrent.Executor executor) |
Creates a new Promise that is not yet completed, using the specified Executor
for asynchronous operations.
|
static <T> Promise<T> |
Promise.narrow(Promise<? extends T> promise) |
Narrows a Promise<? extends T> to Promise<T> through a type-safe cast.
|
default Promise<T> |
Promise.success(T value) |
Completes this Promise with the given value.
|
static <T> Promise<T> |
Promise.successful(@NonNull java.util.concurrent.Executor executor,
T result) |
Creates a Promise that is already completed successfully, using the specified Executor
for asynchronous operations.
|
static <T> Promise<T> |
Promise.successful(T result) |
Creates a Promise that is already completed successfully, using the
Future.DEFAULT_EXECUTOR for asynchronous operations.
|
default Promise<T> |
Promise.tryCompleteWith(@NonNull Future<? extends T> other) |
Attempts to complete this Promise with the result of the given Future once it is completed.
|