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.AsynchronousCompletionTask
Nested 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
ConstructorDescriptionDefaultCollectingAsyncFuture
(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, setSuccess
Methods 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, whenCompleteAsync
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.linkedin.alpini.base.concurrency.AsyncPromise
setComplete
Methods 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, whenCompleteAsync
Methods 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
-true
if 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
-true
if and only if this future can be canceledfilter
- a Function to filter the completing futures.
-