Class AbstractPaxosCallback<T>

java.lang.Object
org.apache.cassandra.service.paxos.v1.AbstractPaxosCallback<T>
All Implemented Interfaces:
RequestCallback<T>
Direct Known Subclasses:
PrepareCallback, ProposeCallback

public abstract class AbstractPaxosCallback<T> extends Object implements RequestCallback<T>
  • Field Details

    • latch

      protected final CountDownLatch latch
    • targets

      protected final int targets
  • Constructor Details

  • Method Details

    • getResponseCount

      public int getResponseCount()
    • await

      public void await() throws WriteTimeoutException
      Throws:
      WriteTimeoutException
    • onFailure

      public void onFailure(InetAddressAndPort from, RequestFailureReason failureReason)
      Description copied from interface: RequestCallback
      Called when there is an exception on the remote node or timeout happens
      Specified by:
      onFailure in interface RequestCallback<T>
    • invokeOnFailure

      public boolean invokeOnFailure()
      Description copied from interface: RequestCallback
      Returns true if the callback handles failure reporting - in which case the remove host will be asked to report failures to us in the event of a problem processing the request. TODO: this is an error prone method, and we should be handling failures everywhere so we should probably just start doing that, and remove this method
      Specified by:
      invokeOnFailure in interface RequestCallback<T>
      Returns:
      true if the callback should be invoked on failure