public interface Pending<I,O>
| Modifier and Type | Method and Description |
|---|---|
static <I,O> CompletableFuture<List<O>> |
callback(List<? extends Pending<I,O>> pending)
Builds a
CompletableFuture suitable for use as a completion callback. |
CompletableFuture<O> |
getFuture() |
I |
getInput() |
CompletableFuture<O> getFuture()
CompletableFuture to complete when the result is ready.I getInput()
static <I,O> CompletableFuture<List<O>> callback(List<? extends Pending<I,O>> pending)
CompletableFuture suitable for use as a completion callback. When completed, each of the
provided Pending's CompletableFuture will be completed.
It is assumed that the size of the list this future is completed with matches the number of provided Pendings. A RuntimeException will be thrown otherwise.
I - Input parameter of Pending operations.O - Output parameter of Pending operations.pending - A list of Pending operations.CompletableFuture that, when completed, then completes each of the given Pending's
CompletableFuture.Copyright © 2018. All rights reserved.