public abstract class AbstractWriteResponseHandler<T> extends java.lang.Object implements IAsyncCallbackWithFailure<T>
| Modifier and Type | Field and Description | 
|---|---|
| protected java.lang.Runnable | callback | 
| ConsistencyLevel | consistencyLevel | 
| protected Keyspace | keyspace | 
| protected static org.slf4j.Logger | logger | 
| protected java.util.Collection<java.net.InetAddress> | naturalEndpoints | 
| protected java.util.Collection<java.net.InetAddress> | pendingEndpoints | 
| protected WriteType | writeType | 
isAlive| Modifier | Constructor and Description | 
|---|---|
| protected  | AbstractWriteResponseHandler(Keyspace keyspace,
                            java.util.Collection<java.net.InetAddress> naturalEndpoints,
                            java.util.Collection<java.net.InetAddress> pendingEndpoints,
                            ConsistencyLevel consistencyLevel,
                            java.lang.Runnable callback,
                            WriteType writeType,
                            long queryStartNanoTime) | 
| Modifier and Type | Method and Description | 
|---|---|
| protected abstract int | ackCount() | 
| void | assureSufficientLiveNodes() | 
| long | currentTimeout() | 
| void | get() | 
| void | onFailure(java.net.InetAddress from,
         RequestFailureReason failureReason)Called when there is an exception on the remote node or timeout happens | 
| abstract void | response(MessageIn<T> msg)null message means "response from local write" | 
| void | setSupportsBackPressure(boolean supportsBackPressure) | 
| protected void | signal() | 
| boolean | supportsBackPressure() | 
| protected int | totalBlockFor() | 
| protected int | totalEndpoints() | 
| protected boolean | waitingFor(java.net.InetAddress from) | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisLatencyForSnitchprotected static final org.slf4j.Logger logger
protected final Keyspace keyspace
protected final java.util.Collection<java.net.InetAddress> naturalEndpoints
public final ConsistencyLevel consistencyLevel
protected final java.lang.Runnable callback
protected final java.util.Collection<java.net.InetAddress> pendingEndpoints
protected final WriteType writeType
protected AbstractWriteResponseHandler(Keyspace keyspace, java.util.Collection<java.net.InetAddress> naturalEndpoints, java.util.Collection<java.net.InetAddress> pendingEndpoints, ConsistencyLevel consistencyLevel, java.lang.Runnable callback, WriteType writeType, long queryStartNanoTime)
callback - A callback to be called when the write is successful.queryStartNanoTime - public void get()
         throws WriteTimeoutException,
                WriteFailureException
public final long currentTimeout()
protected int totalBlockFor()
protected int totalEndpoints()
protected boolean waitingFor(java.net.InetAddress from)
protected abstract int ackCount()
public abstract void response(MessageIn<T> msg)
response in interface IAsyncCallback<T>msg - response received.public void assureSufficientLiveNodes()
                               throws UnavailableException
UnavailableExceptionprotected void signal()
public void onFailure(java.net.InetAddress from,
                      RequestFailureReason failureReason)
IAsyncCallbackWithFailureonFailure in interface IAsyncCallbackWithFailure<T>public boolean supportsBackPressure()
supportsBackPressure in interface IAsyncCallback<T>public void setSupportsBackPressure(boolean supportsBackPressure)
Copyright © 2018 The Apache Software Foundation