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>
-
-
Field Summary
Fields Modifier and Type Field Description protected SimpleConditionconditionprotected static org.slf4j.Loggerloggerprotected java.util.concurrent.atomic.AtomicIntegerresponses
-
Constructor Summary
Constructors Constructor Description TruncateResponseHandler(int responseCount)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidget()booleaninvokeOnFailure()voidonFailure(InetAddressAndPort from, RequestFailureReason failureReason)Called when there is an exception on the remote node or timeout happensvoidonResponse(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 SimpleCondition 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:
onResponsein interfaceRequestCallback<TruncateResponse>- Parameters:
message- response received.
-
onFailure
public void onFailure(InetAddressAndPort from, RequestFailureReason failureReason)
Description copied from interface:RequestCallbackCalled when there is an exception on the remote node or timeout happens- Specified by:
onFailurein interfaceRequestCallback<TruncateResponse>
-
invokeOnFailure
public boolean invokeOnFailure()
- Specified by:
invokeOnFailurein interfaceRequestCallback<TruncateResponse>- Returns:
- true if the callback should be invoked on failure
-
-