Class DefaultCollectingAsyncFuture<V>
java.lang.Object
java.util.concurrent.CompletableFuture<T>
com.linkedin.alpini.base.concurrency.impl.DefaultAsyncFuture<List<V>>
com.linkedin.alpini.base.concurrency.impl.DefaultCollectingAsyncFuture<V>
- All Implemented Interfaces:
AsyncFuture<List<V>>,AsyncPromise<List<V>>,Time.Awaitable,CompletionStage<List<V>>,Future<List<V>>
A specialised instance of @{link AsyncFuture} for collecting the results of one or more
futures of lists into a single list.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.concurrent.CompletableFuture
CompletableFuture.AsynchronousCompletionTaskNested classes/interfaces inherited from interface com.linkedin.alpini.base.concurrency.AsyncFuture
AsyncFuture.Status -
Field Summary
Fields inherited from interface com.linkedin.alpini.base.concurrency.AsyncFuture
NULL_SUCCESS -
Constructor Summary
ConstructorsConstructorDescriptionDefaultCollectingAsyncFuture(List<AsyncFuture<List<V>>> futuresList, boolean cancellable) Creates a new instance.DefaultCollectingAsyncFuture(List<AsyncFuture<List<V>>> futuresList, boolean cancellable, Function<List<V>, List<V>> filter) Creates a new instance. -
Method Summary
Methods inherited from class com.linkedin.alpini.base.concurrency.impl.DefaultAsyncFuture
addListener, addListener, await, await, awaitUninterruptibly, awaitUninterruptibly, cancel, complete, completeExceptionally, get, getCause, getNow, isSuccess, setFailure, setSuccessMethods inherited from class java.util.concurrent.CompletableFuture
acceptEither, acceptEitherAsync, acceptEitherAsync, allOf, anyOf, applyToEither, applyToEitherAsync, applyToEitherAsync, completeAsync, completeAsync, completedFuture, completedStage, completeOnTimeout, copy, defaultExecutor, delayedExecutor, delayedExecutor, exceptionally, exceptionallyAsync, exceptionallyAsync, exceptionallyCompose, exceptionallyComposeAsync, exceptionallyComposeAsync, failedFuture, failedStage, get, getNow, getNumberOfDependents, handle, handleAsync, handleAsync, isCancelled, isCompletedExceptionally, isDone, join, minimalCompletionStage, newIncompleteFuture, obtrudeException, obtrudeValue, orTimeout, runAfterBoth, runAfterBothAsync, runAfterBothAsync, runAfterEither, runAfterEitherAsync, runAfterEitherAsync, runAsync, runAsync, supplyAsync, supplyAsync, thenAccept, thenAcceptAsync, thenAcceptAsync, thenAcceptBoth, thenAcceptBothAsync, thenAcceptBothAsync, thenApply, thenApplyAsync, thenApplyAsync, thenCombine, thenCombineAsync, thenCombineAsync, thenCompose, thenComposeAsync, thenComposeAsync, thenRun, thenRunAsync, thenRunAsync, toCompletableFuture, toString, whenComplete, whenCompleteAsync, whenCompleteAsyncMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.linkedin.alpini.base.concurrency.AsyncPromise
setCompleteMethods inherited from interface java.util.concurrent.CompletionStage
acceptEither, acceptEitherAsync, acceptEitherAsync, applyToEither, applyToEitherAsync, applyToEitherAsync, exceptionally, exceptionallyAsync, exceptionallyAsync, exceptionallyCompose, exceptionallyComposeAsync, exceptionallyComposeAsync, handle, handleAsync, handleAsync, runAfterBoth, runAfterBothAsync, runAfterBothAsync, runAfterEither, runAfterEitherAsync, runAfterEitherAsync, thenAccept, thenAcceptAsync, thenAcceptAsync, thenAcceptBoth, thenAcceptBothAsync, thenAcceptBothAsync, thenApply, thenApplyAsync, thenApplyAsync, thenCombine, thenCombineAsync, thenCombineAsync, thenCompose, thenComposeAsync, thenComposeAsync, thenRun, thenRunAsync, thenRunAsync, toCompletableFuture, whenComplete, whenCompleteAsync, whenCompleteAsyncMethods inherited from interface java.util.concurrent.Future
get, isCancelled, isDone
-
Constructor Details
-
DefaultCollectingAsyncFuture
public DefaultCollectingAsyncFuture(@Nonnull List<AsyncFuture<List<V>>> futuresList, boolean cancellable) Creates a new instance.- Parameters:
futuresList- List of @{AsyncFuture}s to be collated.cancellable-trueif and only if this future can be canceled
-
DefaultCollectingAsyncFuture
public DefaultCollectingAsyncFuture(@Nonnull List<AsyncFuture<List<V>>> futuresList, boolean cancellable, @Nonnull Function<List<V>, List<V>> filter) Creates a new instance.- Parameters:
futuresList- List of @{AsyncFuture}s to be collated.cancellable-trueif and only if this future can be canceledfilter- a Function to filter the completing futures.
-