public class BatchlogResponseHandler<T> extends AbstractWriteResponseHandler<T>
| Modifier and Type | Class and Description |
|---|---|
static class |
BatchlogResponseHandler.BatchlogCleanup |
static interface |
BatchlogResponseHandler.BatchlogCleanupCallback |
| Modifier and Type | Field and Description |
|---|---|
protected int |
requiredBeforeFinish |
callback, logger, replicaPlan, writeType| Constructor and Description |
|---|
BatchlogResponseHandler(AbstractWriteResponseHandler<T> wrapped,
int requiredBeforeFinish,
BatchlogResponseHandler.BatchlogCleanup cleanup,
long queryStartNanoTime) |
| Modifier and Type | Method and Description |
|---|---|
protected int |
ackCount() |
protected int |
blockFor() |
protected int |
candidateReplicaCount()
TODO: this method is brittle for its purpose of deciding when we should fail a query;
this needs to be CL aware, and of which nodes are live/down
|
void |
get() |
boolean |
invokeOnFailure() |
void |
onFailure(InetAddressAndPort from,
RequestFailureReason failureReason)
Called when there is an exception on the remote node or timeout happens
|
void |
onResponse(Message<T> msg)
null message means "response from local write"
|
protected void |
signal() |
protected boolean |
waitingFor(InetAddressAndPort from) |
consistencyLevel, currentTimeoutNanos, expired, logResponseToIdealCLDelegate, maybeTryAdditionalReplicas, setIdealCLResponseHandlerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waittrackLatencyForSnitchpublic BatchlogResponseHandler(AbstractWriteResponseHandler<T> wrapped, int requiredBeforeFinish, BatchlogResponseHandler.BatchlogCleanup cleanup, long queryStartNanoTime)
protected int ackCount()
ackCount in class AbstractWriteResponseHandler<T>public void onResponse(Message<T> msg)
AbstractWriteResponseHandleronResponse in interface RequestCallback<T>onResponse in class AbstractWriteResponseHandler<T>msg - response received.public void onFailure(InetAddressAndPort from, RequestFailureReason failureReason)
RequestCallbackonFailure in interface RequestCallback<T>onFailure in class AbstractWriteResponseHandler<T>public boolean invokeOnFailure()
invokeOnFailure in interface RequestCallback<T>invokeOnFailure in class AbstractWriteResponseHandler<T>public void get()
throws WriteTimeoutException,
WriteFailureException
get in class AbstractWriteResponseHandler<T>WriteTimeoutExceptionWriteFailureExceptionprotected int blockFor()
blockFor in class AbstractWriteResponseHandler<T>protected int candidateReplicaCount()
AbstractWriteResponseHandlercandidateReplicaCount in class AbstractWriteResponseHandler<T>protected boolean waitingFor(InetAddressAndPort from)
waitingFor in class AbstractWriteResponseHandler<T>protected void signal()
signal in class AbstractWriteResponseHandler<T>Copyright © 2009-2020 The Apache Software Foundation