Class AbstractPaxosCallback<T>
java.lang.Object
org.apache.cassandra.service.paxos.v1.AbstractPaxosCallback<T>
- All Implemented Interfaces:
RequestCallback<T>
- Direct Known Subclasses:
PrepareCallback,ProposeCallback
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAbstractPaxosCallback(int targets, ConsistencyLevel consistency, Dispatcher.RequestTime requestTime) -
Method Summary
Modifier and TypeMethodDescriptionvoidawait()intbooleanReturns 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.voidonFailure(InetAddressAndPort from, RequestFailureReason failureReason) Called when there is an exception on the remote node or timeout happensMethods 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
onResponse, trackLatencyForSnitch
-
Field Details
-
latch
-
targets
protected final int targets
-
-
Constructor Details
-
AbstractPaxosCallback
public AbstractPaxosCallback(int targets, ConsistencyLevel consistency, Dispatcher.RequestTime requestTime)
-
-
Method Details
-
getResponseCount
public int getResponseCount() -
await
- Throws:
WriteTimeoutException
-
onFailure
Description copied from interface:RequestCallbackCalled when there is an exception on the remote node or timeout happens- Specified by:
onFailurein interfaceRequestCallback<T>
-
invokeOnFailure
public boolean invokeOnFailure()Description copied from interface:RequestCallbackReturns 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:
invokeOnFailurein interfaceRequestCallback<T>- Returns:
- true if the callback should be invoked on failure
-