Class IracResponseCollector
- All Implemented Interfaces:
Runnable
Multiple keys are batched together in a single requests. The remote site sends a BitSet
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 all responses (or exceptions) are received, IracResponseCollector.IracResponseCompleted.onResponseCompleted(IracBatchSendResult, Collection)
is invoked with the global result in IracBatchSendResult
and a collection with all the
successfully applied keys. Also, the CompletableFuture
returned by freeze()
is completed (completed
value not relevant, and it is never completed exceptionally).
- Since:
- 12
- Author:
- Pedro Ruivo
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionIracResponseCollector
(String cacheName, Collection<org.infinispan.xsite.irac.IracManagerKeyState> batch, IracResponseCollector.IracResponseCompleted listener) -
Method Summary
Modifier and TypeMethodDescriptionvoid
dependsOn
(IracXSiteBackup backup, CompletionStage<? extends IntSet> request) freeze()
void
run()
-
Constructor Details
-
IracResponseCollector
public IracResponseCollector(String cacheName, Collection<org.infinispan.xsite.irac.IracManagerKeyState> batch, IracResponseCollector.IracResponseCompleted listener)
-
-
Method Details