Class IracResponseCollector
- All Implemented Interfaces:
CompletionStage<Void>
,Future<Void>
,BiConsumer<IntSet,
Throwable>
Multiple keys are batched together in a single requests. The remote site sends a IntSet
back where if bit
n
is set, it means the n
th key in the batch failed to be applied (example, lock failed to be
acquired), and it needs to be retried.
If an Exception
is received (example, timed-out waiting for the remote site ack), it assumes all keys in the
batch aren't applied, and they are retried.
When the response (or exception) is received, IracResponseCollector.IracResponseCompleted.onResponseCompleted(IracBatchSendResult, Collection)
is invoked with the global result in IracBatchSendResult
and a collection
with all the successfully applied keys. Once the listener finishes execution, the CompletableFuture
completes
(completed value not relevant, and it is never completed exceptionally).
- Since:
- 12
- Author:
- Pedro Ruivo
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.concurrent.CompletableFuture
CompletableFuture.AsynchronousCompletionTask
-
Method Summary
Methods inherited from class java.util.concurrent.CompletableFuture
acceptEither, acceptEitherAsync, acceptEitherAsync, allOf, anyOf, applyToEither, applyToEitherAsync, applyToEitherAsync, cancel, complete, completeAsync, completeAsync, completedFuture, completedStage, completeExceptionally, completeOnTimeout, copy, defaultExecutor, delayedExecutor, delayedExecutor, exceptionally, exceptionallyAsync, exceptionallyAsync, exceptionallyCompose, exceptionallyComposeAsync, exceptionallyComposeAsync, failedFuture, failedStage, get, 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 java.util.function.BiConsumer
andThen
-
Method Details
-
accept
- Specified by:
accept
in interfaceBiConsumer<IntSet,
Throwable>
-