Package org.apache.cassandra.net
Interface RequestCallback<T>
-
- All Known Implementing Classes:
AbstractPaxosCallback
,AbstractWriteResponseHandler
,AsyncOneResponse
,BatchlogResponseHandler
,BlockingPartitionRepair
,DatacenterSyncWriteResponseHandler
,DatacenterWriteResponseHandler
,PrepareCallback
,ProposeCallback
,ReadCallback
,TruncateResponseHandler
,WriteResponseHandler
public interface RequestCallback<T>
implementors ofRequestCallback
need to make sure that any public methods are threadsafe with respect toonResponse(org.apache.cassandra.net.Message<T>)
being called from the message service. In particular, if any shared state is referenced, making response alone synchronized will not suffice.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default boolean
invokeOnFailure()
default void
onFailure(InetAddressAndPort from, RequestFailureReason failureReason)
Called when there is an exception on the remote node or timeout happensvoid
onResponse(Message<T> msg)
default boolean
trackLatencyForSnitch()
-
-
-
Method Detail
-
onFailure
default void onFailure(InetAddressAndPort from, RequestFailureReason failureReason)
Called when there is an exception on the remote node or timeout happens
-
invokeOnFailure
default boolean invokeOnFailure()
- Returns:
- true if the callback should be invoked on failure
-
trackLatencyForSnitch
default boolean trackLatencyForSnitch()
- Returns:
- true if this callback is on the read path and its latency should be given as input to the dynamic snitch.
-
-