public abstract class AbstractPaxosCallback<T> extends java.lang.Object implements RequestCallback<T>
Modifier and Type | Field and Description |
---|---|
protected java.util.concurrent.CountDownLatch |
latch |
protected int |
targets |
Constructor and Description |
---|
AbstractPaxosCallback(int targets,
ConsistencyLevel consistency,
long queryStartNanoTime) |
Modifier and Type | Method and Description |
---|---|
void |
await() |
int |
getResponseCount() |
boolean |
invokeOnFailure() |
void |
onFailure(InetAddressAndPort from,
RequestFailureReason failureReason)
Called when there is an exception on the remote node or timeout happens
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
onResponse, trackLatencyForSnitch
protected final java.util.concurrent.CountDownLatch latch
protected final int targets
public AbstractPaxosCallback(int targets, ConsistencyLevel consistency, long queryStartNanoTime)
public int getResponseCount()
public void await() throws WriteTimeoutException
WriteTimeoutException
public void onFailure(InetAddressAndPort from, RequestFailureReason failureReason)
RequestCallback
onFailure
in interface RequestCallback<T>
public boolean invokeOnFailure()
invokeOnFailure
in interface RequestCallback<T>
Copyright © 2009- The Apache Software Foundation