Class PaxosPrepareRefresh
- java.lang.Object
-
- org.apache.cassandra.service.paxos.PaxosPrepareRefresh
-
- All Implemented Interfaces:
RequestCallback<org.apache.cassandra.service.paxos.PaxosPrepareRefresh.Response>,RequestCallbackWithFailure<org.apache.cassandra.service.paxos.PaxosPrepareRefresh.Response>
public class PaxosPrepareRefresh extends java.lang.Object implements RequestCallbackWithFailure<org.apache.cassandra.service.paxos.PaxosPrepareRefresh.Response>
Nodes that have promised in response to our prepare, may be missing the latestCommit, meaning we cannot be sure the prior round has been committed to the necessary quorum of participants, so that it will be visible to future quorums. To resolve this problem, we submit the latest commit we have seen, and wait for confirmation before continuing (verifying that we are still promised in the process).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPaxosPrepareRefresh.RequestHandlerstatic classPaxosPrepareRefresh.RequestSerializerstatic classPaxosPrepareRefresh.ResponseSerializer
-
Field Summary
Fields Modifier and Type Field Description static PaxosPrepareRefresh.RequestHandlerrequestHandlerstatic PaxosPrepareRefresh.RequestSerializerrequestSerializerstatic PaxosPrepareRefresh.ResponseSerializerresponseSerializer
-
Constructor Summary
Constructors Constructor Description PaxosPrepareRefresh(Ballot prepared, org.apache.cassandra.service.paxos.Paxos.Participants participants, Commit.Committed latestCommitted, org.apache.cassandra.service.paxos.PaxosPrepareRefresh.Callbacks callbacks)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidonFailure(InetAddressAndPort from, RequestFailureReason reason)Called when there is an exception on the remote node or timeout happensvoidonResponse(Message<org.apache.cassandra.service.paxos.PaxosPrepareRefresh.Response> message)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.cassandra.net.RequestCallback
trackLatencyForSnitch
-
Methods inherited from interface org.apache.cassandra.net.RequestCallbackWithFailure
invokeOnFailure
-
-
-
-
Field Detail
-
requestHandler
public static final PaxosPrepareRefresh.RequestHandler requestHandler
-
requestSerializer
public static final PaxosPrepareRefresh.RequestSerializer requestSerializer
-
responseSerializer
public static final PaxosPrepareRefresh.ResponseSerializer responseSerializer
-
-
Constructor Detail
-
PaxosPrepareRefresh
public PaxosPrepareRefresh(Ballot prepared, org.apache.cassandra.service.paxos.Paxos.Participants participants, Commit.Committed latestCommitted, org.apache.cassandra.service.paxos.PaxosPrepareRefresh.Callbacks callbacks)
-
-
Method Detail
-
onFailure
public void onFailure(InetAddressAndPort from, RequestFailureReason reason)
Description copied from interface:RequestCallbackWithFailureCalled when there is an exception on the remote node or timeout happens- Specified by:
onFailurein interfaceRequestCallback<org.apache.cassandra.service.paxos.PaxosPrepareRefresh.Response>- Specified by:
onFailurein interfaceRequestCallbackWithFailure<org.apache.cassandra.service.paxos.PaxosPrepareRefresh.Response>
-
onResponse
public void onResponse(Message<org.apache.cassandra.service.paxos.PaxosPrepareRefresh.Response> message)
- Specified by:
onResponsein interfaceRequestCallback<org.apache.cassandra.service.paxos.PaxosPrepareRefresh.Response>- Parameters:
message- response received.
-
-