Package org.apache.cassandra.service
Class TruncateResponseHandler
- java.lang.Object
-
- org.apache.cassandra.service.TruncateResponseHandler
-
- All Implemented Interfaces:
RequestCallback<TruncateResponse>
public class TruncateResponseHandler extends java.lang.Object implements RequestCallback<TruncateResponse>
-
-
Constructor Summary
Constructors Constructor Description TruncateResponseHandler(int responseCount)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
get()
boolean
invokeOnFailure()
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.void
onFailure(InetAddressAndPort from, RequestFailureReason failureReason)
Called when there is an exception on the remote node or timeout happensvoid
onResponse(Message<TruncateResponse> 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
-
-
-
-
Field Detail
-
logger
protected static final org.slf4j.Logger logger
-
condition
protected final Condition condition
-
responses
protected final java.util.concurrent.atomic.AtomicInteger responses
-
-
Method Detail
-
get
public void get() throws java.util.concurrent.TimeoutException
- Throws:
java.util.concurrent.TimeoutException
-
onResponse
public void onResponse(Message<TruncateResponse> message)
- Specified by:
onResponse
in interfaceRequestCallback<TruncateResponse>
- Parameters:
message
- response received.
-
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 interfaceRequestCallback<TruncateResponse>
-
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 interfaceRequestCallback<TruncateResponse>
- Returns:
- true if the callback should be invoked on failure
-
-