T - The type of result of the CompletableFutureWaitResultBuilder<T>public interface WaitResultBuilder5<T> extends Supplier<Optional<T>>
CompletableFuture to create the
completable operation it self.| Modifier and Type | Method | Description |
|---|---|---|
default CompletableFuture<Optional<T>> |
asyncExec() |
Create and start the async execution of the
CompletableFuture using
ForkJoinPool.commonPool(). |
default CompletableFuture<Optional<T>> |
asyncExec(Executor executor) |
Create and start the async execution of the
CompletableFuture. |
default Optional<T> |
finish() |
Directly wait for the result of this execution using
ForkJoinPool.commonPool(). |
default Optional<T> |
finish(Executor executor) |
Directly wait for the result of this execution.
|
default T |
finishWithAResult() |
Directly wait for a positive result of this execution using
ForkJoinPool.commonPool(). |
default T |
finishWithAResult(Executor executor) |
Directly wait for a positive result of this execution.
|
Optional<T> |
get() |
Directly wait for the result of this execution (the execution is run in this
thread).
|
Optional<T> get()
AssertionError is
thrown.get in interface Supplier<T>Optional with the result of the executionAssertionError - In case of not ignored exception.default CompletableFuture<Optional<T>> asyncExec(Executor executor)
CompletableFuture.executor - the executor to be used.CompletableFuturedefault CompletableFuture<Optional<T>> asyncExec()
CompletableFuture using
ForkJoinPool.commonPool().CompletableFuturedefault Optional<T> finish(Executor executor)
AssertionError is thrown.executor - the executor to be used.Optional with the result of the executionAssertionError - In case of not ignored exception.default Optional<T> finish()
ForkJoinPool.commonPool(). In case of not ignored exception, an
AssertionError is thrown.Optional with the result of the executionAssertionError - In case of not ignored exception.default T finishWithAResult(Executor executor)
AssertionError is
thrown.executor - the executor to be used.AssertionError - In case of not ignored exception or missing result.default T finishWithAResult()
ForkJoinPool.commonPool(). In case of not ignored exception, or when
no result are available, an AssertionError is thrown.AssertionError - In case of not ignored exception or missing result.Copyright © 2019. All rights reserved.