Class IracResponseCollector

  • All Implemented Interfaces:
    Runnable

    public class IracResponseCollector
    extends Object
    implements Runnable
    A response collector for an asynchronous cross site requests.

    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 nth 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