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 class
PaxosPrepareRefresh.RequestHandler
static class
PaxosPrepareRefresh.RequestSerializer
static class
PaxosPrepareRefresh.ResponseSerializer
-
Field Summary
Fields Modifier and Type Field Description static PaxosPrepareRefresh.RequestHandler
requestHandler
static PaxosPrepareRefresh.RequestSerializer
requestSerializer
static PaxosPrepareRefresh.ResponseSerializer
responseSerializer
-
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 void
onFailure(InetAddressAndPort from, RequestFailureReason reason)
Called when there is an exception on the remote node or timeout happensvoid
onResponse(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:RequestCallbackWithFailure
Called when there is an exception on the remote node or timeout happens- Specified by:
onFailure
in interfaceRequestCallback<org.apache.cassandra.service.paxos.PaxosPrepareRefresh.Response>
- Specified by:
onFailure
in interfaceRequestCallbackWithFailure<org.apache.cassandra.service.paxos.PaxosPrepareRefresh.Response>
-
onResponse
public void onResponse(Message<org.apache.cassandra.service.paxos.PaxosPrepareRefresh.Response> message)
- Specified by:
onResponse
in interfaceRequestCallback<org.apache.cassandra.service.paxos.PaxosPrepareRefresh.Response>
- Parameters:
message
- response received.
-
-