public abstract static class FutureUtils.ConjunctFuture<T> extends CompletableFuture<T>
The advantage of using the ConjunctFuture over chaining all the futures (such as via
CompletableFuture.thenCombine(CompletionStage, BiFunction)
) is that ConjunctFuture
also tracks how many of the Futures are already complete.
CompletableFuture.AsynchronousCompletionTask
Constructor and Description |
---|
ConjunctFuture() |
Modifier and Type | Method and Description |
---|---|
abstract int |
getNumFuturesCompleted()
Gets the number of Futures in the conjunction that are already complete.
|
abstract int |
getNumFuturesTotal()
Gets the total number of Futures in the conjunction.
|
acceptEither, acceptEitherAsync, acceptEitherAsync, allOf, anyOf, applyToEither, applyToEitherAsync, applyToEitherAsync, cancel, complete, completedFuture, completeExceptionally, exceptionally, get, get, getNow, getNumberOfDependents, handle, handleAsync, handleAsync, isCancelled, isCompletedExceptionally, isDone, join, obtrudeException, obtrudeValue, 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
public abstract int getNumFuturesTotal()
public abstract int getNumFuturesCompleted()
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.