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 SimpleCondition
condition
protected static org.slf4j.Logger
logger
protected java.util.concurrent.atomic.AtomicInteger
responses
-
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()
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 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:
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()
- Specified by:
invokeOnFailure
in interfaceRequestCallback<TruncateResponse>
- Returns:
- true if the callback should be invoked on failure
-
-