| Modifier and Type | Class and Description |
|---|---|
| private abstract static class | |
| private static class | |
| private static class | |
| private static enum | |
| private static class | |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private static final DefaultPromise. | |
| private static final StackTraceElement[] | |
| private final EventExecutor | |
| private Object | listeners
One or more listeners. |
| private static final InternalLogger | |
| pack-priv static final Object | |
| private static final InternalLogger | |
| private volatile Object | |
| private static final AtomicReferenceFieldUpdater | |
| private static final Executor | |
| private static final Object | |
| private static final Object | |
| private short | waiters
Threading - synchronized(this). |
| Access | Constructor and Description |
|---|---|
| protected | DefaultPromise(EventExecutor
The executor)EventExecutor which is used to notify the promise once it is complete.
It is assumed this executor will protect against StackOverflowError exceptions.
The executor may be used to avoid StackOverflowError by executing a Runnable if the stack
depth exceeds a threshold.Creates a new unfulfilled promise. |
| private | |
| private |
| Modifier and Type | Method and Description |
|---|---|
| public FutureCompletionStage | acceptEither(CompletionStage<? extends V>
the other CompletionStage other, Consumer<? super V> the action to perform before completing the
returned CompletionStage action)Implements io. |
| public FutureCompletionStage | acceptEitherAsync(CompletionStage<? extends V>
the other CompletionStage other, Consumer<? super V> the action to perform before completing the
returned CompletionStage action)Implements io. |
| public FutureCompletionStage | acceptEitherAsync(CompletionStage<? extends V>
the other CompletionStage other, Consumer<? super V> the action to perform before completing the
returned CompletionStage action, Executor the executor to use for asynchronous execution executor)Implements io. |
| public Future | addListener(FutureListener<? super V>
The listener to be called when this future completes. The listener will be passed this future as
an argument. listener)Implements io. |
| public <C> Future | addListener(C
The context object that will be passed to the listener when this future completes. context, FutureContextListener<? super C, ? super V> The listener to be called when this future completes. The listener will be passed the given
context, and this future. listener)Implements io. |
| private synchronized void | |
| private static <U, V, T> void | applyAndNotify(Promise<U> promise, V value, T value2, BiFunction<? super V, ? super T, ? extends U> fn)
|
| public <U> FutureCompletionStage | applyToEither(CompletionStage<? extends V>
the other CompletionStage other, Function<? super V, U> the function to use to compute the value of the
returned CompletionStage fn)Implements io. |
| public <U> FutureCompletionStage | applyToEitherAsync(CompletionStage<? extends V>
the other CompletionStage other, Function<? super V, U> the function to use to compute the value of the
returned CompletionStage fn)Implements io. |
| public <U> FutureCompletionStage | applyToEitherAsync(CompletionStage<? extends V>
the other CompletionStage other, Function<? super V, U> the function to use to compute the value of the
returned CompletionStage fn, Executor the executor to use for asynchronous execution executor)Implements io. |
| public Future | asFuture()
Implements io. Future instance is associated with this promise.
|
| public FutureCompletionStage | asStage()
Implements io. FutureCompletionStage that reflects the state of this Future and so will receive all
updates as well.
|
| public FutureCompletionStage | await()
Implements io. |
| public boolean | await(long timeout, TimeUnit unit)
Implements io. |
| private boolean | |
| public boolean | cancel()
Overrides default io. Implements io. |
| public boolean | cancel(boolean
true if the thread
executing this task should be interrupted (if the thread is
known to the implementation); otherwise, in-progress tasks are
allowed to completeImplements java. |
| public Throwable | cause()
Overrides default io. Implements io. |
| private Throwable | |
| protected void | |
| protected final void | |
| private synchronized boolean | Returns: true if there are any listeners attached to the promise, false otherwise.Check if there are any waiters and if so notify these. |
| private void | |
| public FutureCompletionStage | exceptionally(Function<Throwable, ? extends V>
the function to use to compute the value of the
returned CompletionStage if this CompletionStage completed
exceptionally fn)Implements io. |
| private static boolean | |
| public final EventExecutor | Returns: The executor used to notify listeners when this promise is complete.Overrides default io. Implements io. |
| public Future | future()
Implements io. Future of this FutureCompletionStage.
|
| public V | get()
Implements java. |
| public V | get(long
the maximum time to wait timeout, TimeUnit the time unit of the timeout argument unit)Implements java. |
| public V | getNow()
Overrides default io. Implements io. |
| public <U> FutureCompletionStage | handle(BiFunction<? super V, Throwable, ? extends U>
the function to use to compute the value of the
returned CompletionStage fn)Implements io. |
| public <U> FutureCompletionStage | handleAsync(BiFunction<? super V, Throwable, ? extends U>
the function to use to compute the value of the
returned CompletionStage fn)Implements io. |
| public <U> FutureCompletionStage | handleAsync(BiFunction<? super V, Throwable, ? extends U>
the function to use to compute the value of the
returned CompletionStage fn, Executor the executor to use for asynchronous execution executor)Implements io. |
| private static <U, V> void | handleAsync0(Promise<U> promise, Future<? super V> f, BiFunction<? super V, Throwable, ? extends U> fn)
|
| private void | |
| public boolean | isCancellable()
Overrides default io. Implements io. true if and only if the operation can be cancelled via cancel().
|
| public boolean | isCancelled()
Implements io. true if this task was cancelled before it completed
normally.
|
| private static boolean | |
| public boolean | isDone()
Implements io. true if this task completed.
|
| private static boolean | |
| public boolean | isFailed()
Overrides default io. Implements io. true if and only if the operation was completed and failed.
|
| public boolean | isSuccess()
Overrides default io. Implements io. true if and only if the operation was completed successfully.
|
| pack-priv static <V> Promise | newFailedPromise(EventExecutor
The executor, Throwable EventExecutor which is used to notify the promise once it is complete.
It is assumed this executor will protect against StackOverflowError exceptions.
The executor may be used to avoid StackOverflowError by executing a Runnable if the stack
depth exceeds a threshold.The cause)Throwable that caused the failure of the returned promise.Creates a new promise that has already failed. |
| pack-priv static <V> Promise | newSuccessfulPromise(EventExecutor
The executor, V EventExecutor which is used to notify the promise once it is complete.
It is assumed this executor will protect against StackOverflowError exceptions.
The executor may be used to avoid StackOverflowError by executing a Runnable if the stack
depth exceeds a threshold.The result of the successful promise. result)Creates a new promise that has already been completed successfully. |
| pack-priv static <V> void | |
| private void | |
| private void | |
| private void | |
| private Executor | |
| private void | |
| public FutureCompletionStage | runAfterBoth(CompletionStage<?>
the other CompletionStage other, Runnable the action to perform before completing the
returned CompletionStage action)Implements io. |
| public FutureCompletionStage | runAfterBothAsync(CompletionStage<?>
the other CompletionStage other, Runnable the action to perform before completing the
returned CompletionStage action)Implements io. |
| public FutureCompletionStage | runAfterBothAsync(CompletionStage<?>
the other CompletionStage other, Runnable the action to perform before completing the
returned CompletionStage action, Executor the executor to use for asynchronous execution executor)Implements io. |
| public FutureCompletionStage | runAfterEither(CompletionStage<?>
the other CompletionStage other, Runnable the action to perform before completing the
returned CompletionStage action)Implements io. |
| public FutureCompletionStage | runAfterEitherAsync(CompletionStage<?>
the other CompletionStage other, Runnable the action to perform before completing the
returned CompletionStage action)Implements io. |
| public FutureCompletionStage | runAfterEitherAsync(CompletionStage<?>
the other CompletionStage other, Runnable the action to perform before completing the
returned CompletionStage action, Executor the executor to use for asynchronous execution executor)Implements io. |
| pack-priv static void | |
| private static void | |
| public Promise | setFailure(Throwable cause)
Implements io. |
| private boolean | |
| public Promise | setSuccess(V result)
Implements io. |
| private boolean | |
| public boolean | setUncancellable()
Implements io. |
| private boolean | |
| public FutureCompletionStage | sync()
Implements io. |
| public FutureCompletionStage | thenAccept(Consumer<? super V>
the action to perform before completing the
returned CompletionStage action)Implements io. |
| public FutureCompletionStage | thenAcceptAsync(Consumer<? super V>
the action to perform before completing the
returned CompletionStage action)Implements io. |
| public FutureCompletionStage | thenAcceptAsync(Consumer<? super V>
the action to perform before completing the
returned CompletionStage action, Executor the executor to use for asynchronous execution executor)Implements io. |
| private static <U, V> void | |
| public <U> FutureCompletionStage | thenAcceptBoth(CompletionStage<? extends U>
the other CompletionStage other, BiConsumer<? super V, ? super U> the action to perform before completing the
returned CompletionStage action)Implements io. |
| public <U> FutureCompletionStage | thenAcceptBothAsync(CompletionStage<? extends U>
the other CompletionStage other, BiConsumer<? super V, ? super U> the action to perform before completing the
returned CompletionStage action)Implements io. |
| public <U> FutureCompletionStage | thenAcceptBothAsync(CompletionStage<? extends U>
the other CompletionStage other, BiConsumer<? super V, ? super U> the action to perform before completing the
returned CompletionStage action, Executor the executor to use for asynchronous execution executor)Implements io. |
| public <U> FutureCompletionStage | thenApply(Function<? super V, ? extends U>
the function to use to compute the value of the
returned CompletionStage fn)Implements io. |
| public <U> FutureCompletionStage | thenApplyAsync(Function<? super V, ? extends U>
the function to use to compute the value of the
returned CompletionStage fn)Implements io. |
| public <U> FutureCompletionStage | thenApplyAsync(Function<? super V, ? extends U>
the function to use to compute the value of the
returned CompletionStage fn, Executor the executor to use for asynchronous execution executor)Implements io. |
| private static <U, V> void | |
| public <U, V1> FutureCompletionStage | thenCombine(CompletionStage<? extends U>
the other CompletionStage other, BiFunction<? super V, ? super U, ? extends V1> the function to use to compute the value of the
returned CompletionStage fn)Implements io. |
| public <U, V1> FutureCompletionStage | thenCombineAsync(CompletionStage<? extends U>
the other CompletionStage other, BiFunction<? super V, ? super U, ? extends V1> the function to use to compute the value of the
returned CompletionStage fn)Implements io. |
| public <U, V1> FutureCompletionStage | thenCombineAsync(CompletionStage<? extends U>
the other CompletionStage other, BiFunction<? super V, ? super U, ? extends V1> the function to use to compute the value of the
returned CompletionStage fn, Executor the executor to use for asynchronous execution executor)Implements io. |
| public <U> FutureCompletionStage | thenCompose(Function<? super V, ? extends CompletionStage<U>>
the function to use to compute another CompletionStage fn)Implements io. |
| public <U> FutureCompletionStage | thenComposeAsync(Function<? super V, ? extends CompletionStage<U>>
the function to use to compute another CompletionStage fn)Implements io. |
| public <U> FutureCompletionStage | thenComposeAsync(Function<? super V, ? extends CompletionStage<U>>
the function to use to compute another CompletionStage fn, Executor the executor to use for asynchronous execution executor)Implements io. |
| private static <V, U> void | thenComposeAsync0(Promise<U> promise, Function<? super V, ? extends CompletionStage<U>> fn, V value)
|
| public FutureCompletionStage | thenRun(Runnable
the action to perform before completing the
returned CompletionStage action)Implements io. |
| public FutureCompletionStage | thenRunAsync(Runnable
the action to perform before completing the
returned CompletionStage action)Implements io. |
| public FutureCompletionStage | thenRunAsync(Runnable
the action to perform before completing the
returned CompletionStage action, Executor the executor to use for asynchronous execution executor)Implements io. |
| public String | |
| protected StringBuilder | |
| public boolean | tryFailure(Throwable cause)
Implements io. |
| public boolean | trySuccess(V result)
Implements io. |
| public FutureCompletionStage | whenComplete(BiConsumer<? super V, ? super Throwable>
the action to perform action)Implements io. |
| public FutureCompletionStage | whenCompleteAsync(BiConsumer<? super V, ? super Throwable>
the action to perform action)Implements io. |
| public FutureCompletionStage | whenCompleteAsync(BiConsumer<? super V, ? super Throwable>
the action to perform action, Executor the executor to use for asynchronous execution executor)Implements io. |
| private static <V> void | whenCompleteAsync0(Promise<V> promise, Future<? extends V> f, BiConsumer<? super V, ? super Throwable> action)
|