Class BlockingPartitionRepair

  • All Implemented Interfaces:
    com.google.common.util.concurrent.ListenableFuture<java.lang.Object>, io.netty.util.concurrent.Future<java.lang.Object>, java.util.concurrent.Future<java.lang.Object>, RequestCallback<java.lang.Object>, Awaitable, Future<java.lang.Object>

    public class BlockingPartitionRepair
    extends AsyncFuture<java.lang.Object>
    implements RequestCallback<java.lang.Object>
    • Method Detail

      • onResponse

        public void onResponse​(Message<java.lang.Object> msg)
        Specified by:
        onResponse in interface RequestCallback<java.lang.Object>
        Parameters:
        msg - response received.
      • sendInitialRepairs

        public void sendInitialRepairs()
      • awaitRepairsUntil

        public boolean awaitRepairsUntil​(long timeoutAt,
                                         java.util.concurrent.TimeUnit timeUnit)
        Wait for the repair to complete util a future time If the {@param timeoutAt} is a past time, the method returns immediately with the repair result.
        Parameters:
        timeoutAt - future time
        timeUnit - the time unit of the future time
        Returns:
        true if repair is done; otherwise, false.
      • maybeSendAdditionalWrites

        public void maybeSendAdditionalWrites​(long timeout,
                                              java.util.concurrent.TimeUnit timeoutUnit)
        If it looks like we might not receive acks for all the repair mutations we sent out, combine all the unacked mutations and send them to the minority of nodes not involved in the read repair data read / write cycle. We will accept acks from them in lieu of acks from the initial mutations sent out, so long as we receive the same number of acks as repair mutations transmitted. This prevents misbehaving nodes from killing a quorum read, while continuing to guarantee monotonic quorum reads