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 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 ClassesModifier and TypeClassDescriptionstatic classstatic classstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PaxosPrepareRefresh.RequestHandlerstatic final PaxosPrepareRefresh.RequestSerializerstatic final PaxosPrepareRefresh.ResponseSerializer -
Constructor Summary
ConstructorsConstructorDescriptionPaxosPrepareRefresh(Ballot prepared, org.apache.cassandra.service.paxos.Paxos.Participants participants, Commit.Committed latestCommitted, org.apache.cassandra.service.paxos.PaxosPrepareRefresh.Callbacks callbacks) -
Method Summary
Modifier and TypeMethodDescriptionvoidonFailure(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, waitMethods inherited from interface org.apache.cassandra.net.RequestCallback
trackLatencyForSnitchMethods inherited from interface org.apache.cassandra.net.RequestCallbackWithFailure
invokeOnFailure
-
Field Details
-
requestHandler
-
requestSerializer
-
responseSerializer
-
-
Constructor Details
-
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 Details
-
onFailure
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.
-