T - a type of the successfully resolved promise valuepublic class ConfigurableDependentPromise<T> extends Object implements DependentPromise<T>, Decorator<T>
DependentPromise implementation, i.e. concrete wrapper that may keep track origin of this promise
and cancel them along with this promise itself.
For example:
DependentPromise<?> p1 = DependentPromise.from(CallableTask.runAsync(this::someLongRunningMethod, myExecutor));
DependentPromise<?> p2 = p1.thenRunAsync(this::someOtherLongRunningTask, true);
...
p2.cancel(true);
In the example p2 is created with specifying p1 as origin (last argument is true).
Now when canceling p2 both p2 and p1 will be cancelled if not completed yet.
The class implements overloads to all composition methods declared in DependentPromise interface.
The ones that accepts another CompletionStage as argument (named *Both* and
*Either* are overloaded with a set of @{link PromiseOrigin as an argument to let
you specify what to enlist as origin: "this" related to method call or the parameter.
Rest of methods from CompletionStage API are overloaded with boolean argument
enlistOrigin that specify whether or not the Promise object whose
method is invoiked should be added as an origin to result.
All methods originally specified in CompletionStage does not add "this" as an origin to
resulting promise.
| Modifier and Type | Field and Description |
|---|---|
protected CompletionStage<?>[] |
cancellableOrigins |
protected Set<PromiseOrigin> |
defaultEnlistOptions |
protected Promise<T> |
delegate |
| Modifier | Constructor and Description |
|---|---|
protected |
ConfigurableDependentPromise(Promise<T> delegate,
Set<PromiseOrigin> defaultEnlistOptions,
CompletionStage<?>[] cancellableOrigins) |
protected final CompletionStage<?>[] cancellableOrigins
protected final Set<PromiseOrigin> defaultEnlistOptions
protected ConfigurableDependentPromise(Promise<T> delegate, Set<PromiseOrigin> defaultEnlistOptions, CompletionStage<?>[] cancellableOrigins)
protected ConfigurableDependentPromise<T> setup()
public static <U> DependentPromise<U> from(Promise<U> source)
from in interface DependentPromise<T>public static <U> DependentPromise<U> from(Promise<U> source, Set<PromiseOrigin> defaultEnlistOptions)
from in interface DependentPromise<T>protected <U> DependentPromise<U> wrap(Promise<U> original, CompletionStage<?>[] cancellableOrigins)
public DependentPromise<T> onCancel(Runnable action)
public DependentPromise<T> delay(Duration duration, boolean delayOnError)
public DependentPromise<T> delay(Duration duration, boolean delayOnError, boolean enlistOrigin)
delay in interface DependentPromise<T>public DependentPromise<T> orTimeout(Duration duration, boolean cancelOnTimeout)
public DependentPromise<T> orTimeout(Duration duration, boolean cancelOnTimeout, boolean enlistOrigin)
orTimeout in interface DependentPromise<T>public DependentPromise<T> onTimeout(T value, Duration duration, boolean cancelOnTimeout)
public DependentPromise<T> onTimeout(T value, Duration duration, boolean cancelOnTimeout, boolean enlistOrigin)
onTimeout in interface DependentPromise<T>public DependentPromise<T> onTimeout(Supplier<? extends T> supplier, Duration duration, boolean cancelOnTimeout)
public DependentPromise<T> onTimeout(Supplier<? extends T> supplier, Duration duration, boolean cancelOnTimeout, boolean enlistOrigin)
onTimeout in interface DependentPromise<T>public <U> DependentPromise<U> thenApply(Function<? super T,? extends U> fn, boolean enlistOrigin)
thenApply in interface DependentPromise<T>public <U> DependentPromise<U> thenApplyAsync(Function<? super T,? extends U> fn, boolean enlistOrigin)
thenApplyAsync in interface DependentPromise<T>public <U> DependentPromise<U> thenApplyAsync(Function<? super T,? extends U> fn, Executor executor, boolean enlistOrigin)
thenApplyAsync in interface DependentPromise<T>public DependentPromise<Void> thenAccept(Consumer<? super T> action, boolean enlistOrigin)
thenAccept in interface DependentPromise<T>public DependentPromise<Void> thenAcceptAsync(Consumer<? super T> action, boolean enlistOrigin)
thenAcceptAsync in interface DependentPromise<T>public DependentPromise<Void> thenAcceptAsync(Consumer<? super T> action, Executor executor, boolean enlistOrigin)
thenAcceptAsync in interface DependentPromise<T>public DependentPromise<Void> thenRun(Runnable action, boolean enlistOrigin)
thenRun in interface DependentPromise<T>public DependentPromise<Void> thenRunAsync(Runnable action, boolean enlistOrigin)
thenRunAsync in interface DependentPromise<T>public DependentPromise<Void> thenRunAsync(Runnable action, Executor executor, boolean enlistOrigin)
thenRunAsync in interface DependentPromise<T>public <U,V> DependentPromise<V> thenCombine(CompletionStage<? extends U> other, BiFunction<? super T,? super U,? extends V> fn, Set<PromiseOrigin> enlistOptions)
thenCombine in interface DependentPromise<T>public <U,V> DependentPromise<V> thenCombineAsync(CompletionStage<? extends U> other, BiFunction<? super T,? super U,? extends V> fn, Set<PromiseOrigin> enlistOptions)
thenCombineAsync in interface DependentPromise<T>public <U,V> DependentPromise<V> thenCombineAsync(CompletionStage<? extends U> other, BiFunction<? super T,? super U,? extends V> fn, Executor executor, Set<PromiseOrigin> enlistOptions)
thenCombineAsync in interface DependentPromise<T>public <U> DependentPromise<Void> thenAcceptBoth(CompletionStage<? extends U> other, BiConsumer<? super T,? super U> action, Set<PromiseOrigin> enlistOptions)
thenAcceptBoth in interface DependentPromise<T>public <U> DependentPromise<Void> thenAcceptBothAsync(CompletionStage<? extends U> other, BiConsumer<? super T,? super U> action, Set<PromiseOrigin> enlistOptions)
thenAcceptBothAsync in interface DependentPromise<T>public <U> DependentPromise<Void> thenAcceptBothAsync(CompletionStage<? extends U> other, BiConsumer<? super T,? super U> action, Executor executor, Set<PromiseOrigin> enlistOptions)
thenAcceptBothAsync in interface DependentPromise<T>public DependentPromise<Void> runAfterBoth(CompletionStage<?> other, Runnable action, Set<PromiseOrigin> enlistOptions)
runAfterBoth in interface DependentPromise<T>public DependentPromise<Void> runAfterBothAsync(CompletionStage<?> other, Runnable action, Set<PromiseOrigin> enlistOptions)
runAfterBothAsync in interface DependentPromise<T>public DependentPromise<Void> runAfterBothAsync(CompletionStage<?> other, Runnable action, Executor executor, Set<PromiseOrigin> enlistOptions)
runAfterBothAsync in interface DependentPromise<T>public <U> DependentPromise<U> applyToEither(CompletionStage<? extends T> other, Function<? super T,U> fn, Set<PromiseOrigin> enlistOptions)
applyToEither in interface DependentPromise<T>public <U> DependentPromise<U> applyToEitherAsync(CompletionStage<? extends T> other, Function<? super T,U> fn, Set<PromiseOrigin> enlistOptions)
applyToEitherAsync in interface DependentPromise<T>public <U> DependentPromise<U> applyToEitherAsync(CompletionStage<? extends T> other, Function<? super T,U> fn, Executor executor, Set<PromiseOrigin> enlistOptions)
applyToEitherAsync in interface DependentPromise<T>public DependentPromise<Void> acceptEither(CompletionStage<? extends T> other, Consumer<? super T> action, Set<PromiseOrigin> enlistOptions)
acceptEither in interface DependentPromise<T>public DependentPromise<Void> acceptEitherAsync(CompletionStage<? extends T> other, Consumer<? super T> action, Set<PromiseOrigin> enlistOptions)
acceptEitherAsync in interface DependentPromise<T>public DependentPromise<Void> acceptEitherAsync(CompletionStage<? extends T> other, Consumer<? super T> action, Executor executor, Set<PromiseOrigin> enlistOptions)
acceptEitherAsync in interface DependentPromise<T>public DependentPromise<Void> runAfterEither(CompletionStage<?> other, Runnable action, Set<PromiseOrigin> enlistOptions)
runAfterEither in interface DependentPromise<T>public DependentPromise<Void> runAfterEitherAsync(CompletionStage<?> other, Runnable action, Set<PromiseOrigin> enlistOptions)
runAfterEitherAsync in interface DependentPromise<T>public DependentPromise<Void> runAfterEitherAsync(CompletionStage<?> other, Runnable action, Executor executor, Set<PromiseOrigin> enlistOptions)
runAfterEitherAsync in interface DependentPromise<T>public <U> DependentPromise<U> thenCompose(Function<? super T,? extends CompletionStage<U>> fn, boolean enlistOrigin)
thenCompose in interface DependentPromise<T>public <U> DependentPromise<U> thenComposeAsync(Function<? super T,? extends CompletionStage<U>> fn, boolean enlistOrigin)
thenComposeAsync in interface DependentPromise<T>public <U> DependentPromise<U> thenComposeAsync(Function<? super T,? extends CompletionStage<U>> fn, Executor executor, boolean enlistOrigin)
thenComposeAsync in interface DependentPromise<T>public DependentPromise<T> exceptionally(Function<Throwable,? extends T> fn, boolean enlistOrigin)
exceptionally in interface DependentPromise<T>public DependentPromise<T> exceptionallyAsync(Function<Throwable,? extends T> fn, boolean enlistOrigin)
exceptionallyAsync in interface DependentPromise<T>public DependentPromise<T> exceptionallyAsync(Function<Throwable,? extends T> fn, Executor executor, boolean enlistOrigin)
exceptionallyAsync in interface DependentPromise<T>public DependentPromise<T> exceptionallyCompose(Function<Throwable,? extends CompletionStage<T>> fn, boolean enlistOrigin)
exceptionallyCompose in interface DependentPromise<T>public DependentPromise<T> exceptionallyComposeAsync(Function<Throwable,? extends CompletionStage<T>> fn, boolean enlistOrigin)
exceptionallyComposeAsync in interface DependentPromise<T>public DependentPromise<T> exceptionallyComposeAsync(Function<Throwable,? extends CompletionStage<T>> fn, Executor executor, boolean enlistOrigin)
exceptionallyComposeAsync in interface DependentPromise<T>public DependentPromise<T> thenFilter(Predicate<? super T> predicate, boolean enlistOrigin)
thenFilter in interface DependentPromise<T>public DependentPromise<T> thenFilter(Predicate<? super T> predicate, Function<? super T,Throwable> errorSupplier, boolean enlistOrigin)
thenFilter in interface DependentPromise<T>public DependentPromise<T> thenFilterAsync(Predicate<? super T> predicate, boolean enlistOrigin)
thenFilterAsync in interface DependentPromise<T>public DependentPromise<T> thenFilterAsync(Predicate<? super T> predicate, Function<? super T,Throwable> errorSupplier, boolean enlistOrigin)
thenFilterAsync in interface DependentPromise<T>public DependentPromise<T> thenFilterAsync(Predicate<? super T> predicate, Executor executor, boolean enlistOrigin)
thenFilterAsync in interface DependentPromise<T>public DependentPromise<T> thenFilterAsync(Predicate<? super T> predicate, Function<? super T,Throwable> errorSupplier, Executor executor, boolean enlistOrigin)
thenFilterAsync in interface DependentPromise<T>public DependentPromise<T> whenComplete(BiConsumer<? super T,? super Throwable> action, boolean enlistOrigin)
whenComplete in interface DependentPromise<T>public DependentPromise<T> whenCompleteAsync(BiConsumer<? super T,? super Throwable> action, boolean enlistOrigin)
whenCompleteAsync in interface DependentPromise<T>public DependentPromise<T> whenCompleteAsync(BiConsumer<? super T,? super Throwable> action, Executor executor, boolean enlistOrigin)
whenCompleteAsync in interface DependentPromise<T>public <U> DependentPromise<U> handle(BiFunction<? super T,Throwable,? extends U> fn, boolean enlistOrigin)
handle in interface DependentPromise<T>public <U> DependentPromise<U> handleAsync(BiFunction<? super T,Throwable,? extends U> fn, boolean enlistOrigin)
handleAsync in interface DependentPromise<T>public <U> DependentPromise<U> handleAsync(BiFunction<? super T,Throwable,? extends U> fn, Executor executor, boolean enlistOrigin)
handleAsync in interface DependentPromise<T>public <U> DependentPromise<U> thenApply(Function<? super T,? extends U> fn)
thenApply in interface CompletionStage<T>thenApply in interface DependentPromise<T>thenApply in interface Promise<T>public <U> DependentPromise<U> thenApplyAsync(Function<? super T,? extends U> fn)
thenApplyAsync in interface CompletionStage<T>thenApplyAsync in interface DependentPromise<T>thenApplyAsync in interface Promise<T>public <U> DependentPromise<U> thenApplyAsync(Function<? super T,? extends U> fn, Executor executor)
thenApplyAsync in interface CompletionStage<T>thenApplyAsync in interface DependentPromise<T>thenApplyAsync in interface Promise<T>public DependentPromise<Void> thenAccept(Consumer<? super T> action)
thenAccept in interface CompletionStage<T>thenAccept in interface DependentPromise<T>thenAccept in interface Promise<T>public DependentPromise<Void> thenAcceptAsync(Consumer<? super T> action)
thenAcceptAsync in interface CompletionStage<T>thenAcceptAsync in interface DependentPromise<T>thenAcceptAsync in interface Promise<T>public DependentPromise<Void> thenAcceptAsync(Consumer<? super T> action, Executor executor)
thenAcceptAsync in interface CompletionStage<T>thenAcceptAsync in interface DependentPromise<T>thenAcceptAsync in interface Promise<T>public DependentPromise<Void> thenRun(Runnable action)
thenRun in interface CompletionStage<T>thenRun in interface DependentPromise<T>thenRun in interface Promise<T>public DependentPromise<Void> thenRunAsync(Runnable action)
thenRunAsync in interface CompletionStage<T>thenRunAsync in interface DependentPromise<T>thenRunAsync in interface Promise<T>public DependentPromise<Void> thenRunAsync(Runnable action, Executor executor)
thenRunAsync in interface CompletionStage<T>thenRunAsync in interface DependentPromise<T>thenRunAsync in interface Promise<T>public <U,V> DependentPromise<V> thenCombine(CompletionStage<? extends U> other, BiFunction<? super T,? super U,? extends V> fn)
thenCombine in interface CompletionStage<T>thenCombine in interface DependentPromise<T>thenCombine in interface Promise<T>public <U,V> DependentPromise<V> thenCombineAsync(CompletionStage<? extends U> other, BiFunction<? super T,? super U,? extends V> fn)
thenCombineAsync in interface CompletionStage<T>thenCombineAsync in interface DependentPromise<T>thenCombineAsync in interface Promise<T>public <U,V> DependentPromise<V> thenCombineAsync(CompletionStage<? extends U> other, BiFunction<? super T,? super U,? extends V> fn, Executor executor)
thenCombineAsync in interface CompletionStage<T>thenCombineAsync in interface DependentPromise<T>thenCombineAsync in interface Promise<T>public <U> DependentPromise<Void> thenAcceptBoth(CompletionStage<? extends U> other, BiConsumer<? super T,? super U> action)
thenAcceptBoth in interface CompletionStage<T>thenAcceptBoth in interface DependentPromise<T>thenAcceptBoth in interface Promise<T>public <U> DependentPromise<Void> thenAcceptBothAsync(CompletionStage<? extends U> other, BiConsumer<? super T,? super U> action)
thenAcceptBothAsync in interface CompletionStage<T>thenAcceptBothAsync in interface DependentPromise<T>thenAcceptBothAsync in interface Promise<T>public <U> DependentPromise<Void> thenAcceptBothAsync(CompletionStage<? extends U> other, BiConsumer<? super T,? super U> action, Executor executor)
thenAcceptBothAsync in interface CompletionStage<T>thenAcceptBothAsync in interface DependentPromise<T>thenAcceptBothAsync in interface Promise<T>public DependentPromise<Void> runAfterBoth(CompletionStage<?> other, Runnable action)
runAfterBoth in interface CompletionStage<T>runAfterBoth in interface DependentPromise<T>runAfterBoth in interface Promise<T>public DependentPromise<Void> runAfterBothAsync(CompletionStage<?> other, Runnable action)
runAfterBothAsync in interface CompletionStage<T>runAfterBothAsync in interface DependentPromise<T>runAfterBothAsync in interface Promise<T>public DependentPromise<Void> runAfterBothAsync(CompletionStage<?> other, Runnable action, Executor executor)
runAfterBothAsync in interface CompletionStage<T>runAfterBothAsync in interface DependentPromise<T>runAfterBothAsync in interface Promise<T>public <U> DependentPromise<U> applyToEither(CompletionStage<? extends T> other, Function<? super T,U> fn)
applyToEither in interface CompletionStage<T>applyToEither in interface DependentPromise<T>applyToEither in interface Promise<T>public <U> DependentPromise<U> applyToEitherAsync(CompletionStage<? extends T> other, Function<? super T,U> fn)
applyToEitherAsync in interface CompletionStage<T>applyToEitherAsync in interface DependentPromise<T>applyToEitherAsync in interface Promise<T>public <U> DependentPromise<U> applyToEitherAsync(CompletionStage<? extends T> other, Function<? super T,U> fn, Executor executor)
applyToEitherAsync in interface CompletionStage<T>applyToEitherAsync in interface DependentPromise<T>applyToEitherAsync in interface Promise<T>public DependentPromise<Void> acceptEither(CompletionStage<? extends T> other, Consumer<? super T> action)
acceptEither in interface CompletionStage<T>acceptEither in interface DependentPromise<T>acceptEither in interface Promise<T>public DependentPromise<Void> acceptEitherAsync(CompletionStage<? extends T> other, Consumer<? super T> action)
acceptEitherAsync in interface CompletionStage<T>acceptEitherAsync in interface DependentPromise<T>acceptEitherAsync in interface Promise<T>public DependentPromise<Void> acceptEitherAsync(CompletionStage<? extends T> other, Consumer<? super T> action, Executor executor)
acceptEitherAsync in interface CompletionStage<T>acceptEitherAsync in interface DependentPromise<T>acceptEitherAsync in interface Promise<T>public DependentPromise<Void> runAfterEither(CompletionStage<?> other, Runnable action)
runAfterEither in interface CompletionStage<T>runAfterEither in interface DependentPromise<T>runAfterEither in interface Promise<T>public DependentPromise<Void> runAfterEitherAsync(CompletionStage<?> other, Runnable action)
runAfterEitherAsync in interface CompletionStage<T>runAfterEitherAsync in interface DependentPromise<T>runAfterEitherAsync in interface Promise<T>public DependentPromise<Void> runAfterEitherAsync(CompletionStage<?> other, Runnable action, Executor executor)
runAfterEitherAsync in interface CompletionStage<T>runAfterEitherAsync in interface DependentPromise<T>runAfterEitherAsync in interface Promise<T>public <U> DependentPromise<U> thenCompose(Function<? super T,? extends CompletionStage<U>> fn)
thenCompose in interface CompletionStage<T>thenCompose in interface DependentPromise<T>thenCompose in interface Promise<T>public <U> DependentPromise<U> thenComposeAsync(Function<? super T,? extends CompletionStage<U>> fn)
thenComposeAsync in interface CompletionStage<T>thenComposeAsync in interface DependentPromise<T>thenComposeAsync in interface Promise<T>public <U> DependentPromise<U> thenComposeAsync(Function<? super T,? extends CompletionStage<U>> fn, Executor executor)
thenComposeAsync in interface CompletionStage<T>thenComposeAsync in interface DependentPromise<T>thenComposeAsync in interface Promise<T>public DependentPromise<T> exceptionally(Function<Throwable,? extends T> fn)
exceptionally in interface CompletionStage<T>exceptionally in interface DependentPromise<T>exceptionally in interface Promise<T>public DependentPromise<T> exceptionallyAsync(Function<Throwable,? extends T> fn)
exceptionallyAsync in interface DependentPromise<T>exceptionallyAsync in interface Promise<T>public DependentPromise<T> exceptionallyCompose(Function<Throwable,? extends CompletionStage<T>> fn)
exceptionallyCompose in interface DependentPromise<T>exceptionallyCompose in interface Promise<T>public DependentPromise<T> exceptionallyComposeAsync(Function<Throwable,? extends CompletionStage<T>> fn)
exceptionallyComposeAsync in interface DependentPromise<T>exceptionallyComposeAsync in interface Promise<T>public DependentPromise<T> exceptionallyComposeAsync(Function<Throwable,? extends CompletionStage<T>> fn, Executor executor)
exceptionallyComposeAsync in interface DependentPromise<T>exceptionallyComposeAsync in interface Promise<T>public DependentPromise<T> exceptionallyAsync(Function<Throwable,? extends T> fn, Executor executor)
exceptionallyAsync in interface DependentPromise<T>exceptionallyAsync in interface Promise<T>public DependentPromise<T> thenFilter(Predicate<? super T> predicate)
thenFilter in interface DependentPromise<T>thenFilter in interface Promise<T>public DependentPromise<T> thenFilter(Predicate<? super T> predicate, Function<? super T,Throwable> errorSupplier)
thenFilter in interface DependentPromise<T>thenFilter in interface Promise<T>public DependentPromise<T> thenFilterAsync(Predicate<? super T> predicate)
thenFilterAsync in interface DependentPromise<T>thenFilterAsync in interface Promise<T>public DependentPromise<T> thenFilterAsync(Predicate<? super T> predicate, Function<? super T,Throwable> errorSupplier)
thenFilterAsync in interface DependentPromise<T>thenFilterAsync in interface Promise<T>public DependentPromise<T> thenFilterAsync(Predicate<? super T> predicate, Executor executor)
thenFilterAsync in interface DependentPromise<T>thenFilterAsync in interface Promise<T>public DependentPromise<T> thenFilterAsync(Predicate<? super T> predicate, Function<? super T,Throwable> errorSupplier, Executor executor)
thenFilterAsync in interface DependentPromise<T>thenFilterAsync in interface Promise<T>public DependentPromise<T> whenComplete(BiConsumer<? super T,? super Throwable> action)
whenComplete in interface CompletionStage<T>whenComplete in interface DependentPromise<T>whenComplete in interface Promise<T>public DependentPromise<T> whenCompleteAsync(BiConsumer<? super T,? super Throwable> action)
whenCompleteAsync in interface CompletionStage<T>whenCompleteAsync in interface DependentPromise<T>whenCompleteAsync in interface Promise<T>public DependentPromise<T> whenCompleteAsync(BiConsumer<? super T,? super Throwable> action, Executor executor)
whenCompleteAsync in interface CompletionStage<T>whenCompleteAsync in interface DependentPromise<T>whenCompleteAsync in interface Promise<T>public <U> DependentPromise<U> handle(BiFunction<? super T,Throwable,? extends U> fn)
handle in interface CompletionStage<T>handle in interface DependentPromise<T>handle in interface Promise<T>public <U> DependentPromise<U> handleAsync(BiFunction<? super T,Throwable,? extends U> fn)
handleAsync in interface CompletionStage<T>handleAsync in interface DependentPromise<T>handleAsync in interface Promise<T>public <U> DependentPromise<U> handleAsync(BiFunction<? super T,Throwable,? extends U> fn, Executor executor)
handleAsync in interface CompletionStage<T>handleAsync in interface DependentPromise<T>handleAsync in interface Promise<T>public DependentPromise<T> dependent()
PromisePromise to a DependentPromise
The returned DependentPromise does not implicitly enlist any CompletionStage
for cancellation (neither self, nor passed as arguments to combining methods);
only enlisting via explicit parameter is supportedpublic DependentPromise<T> dependent(Set<PromiseOrigin> defaultEnlistOptions)
PromisePromise to a DependentPromise
The returned DependentPromise does implicitly enlist CompletionStage
for cancellation (either self, and/or passed as arguments to combining methods)
according to defaultEnlistOptions parameterdependent in interface Promise<T>defaultEnlistOptions - defines what CompletionStage should be enlisted implicitly for cancellationpublic boolean cancel(boolean mayInterruptIfRunning)
public boolean isCancelled()
isCancelled in interface Future<T>public T get() throws InterruptedException, ExecutionException
get in interface Future<T>InterruptedExceptionExecutionExceptionpublic T get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
get in interface Future<T>InterruptedExceptionExecutionExceptionTimeoutExceptionpublic T getNow(T valueIfAbsent) throws CancellationException, CompletionException
getNow in interface Promise<T>CancellationExceptionCompletionExceptionpublic T getNow(Supplier<? extends T> valueIfAbsent) throws CancellationException, CompletionException
getNow in interface Promise<T>CancellationExceptionCompletionExceptionpublic T join() throws CancellationException, CompletionException
join in interface Promise<T>CancellationExceptionCompletionExceptionpublic boolean isCompletedExceptionally()
isCompletedExceptionally in interface Promise<T>public Promise<T> unwrap()
PromisePromise if it was decorated (removes one level of decorators)public Promise<T> raw()
PromisePromise (removes all decoration layers)public CompletableFuture<T> toCompletableFuture()
toCompletableFuture in interface CompletionStage<T>public CompletableFuture<T> toCompletableFuture(boolean enlistOrigin)
toCompletableFuture in interface DependentPromise<T>public CompletionStage<T> α()
Copyright © 2021. All rights reserved.