org.apache.cassandra.service
Class AbstractWriteResponseHandler
java.lang.Object
org.apache.cassandra.service.AbstractWriteResponseHandler
- All Implemented Interfaces:
- IAsyncCallback, IMessageCallback, IWriteResponseHandler
- Direct Known Subclasses:
- DatacenterSyncWriteResponseHandler, WriteResponseHandler
public abstract class AbstractWriteResponseHandler
- extends java.lang.Object
- implements IWriteResponseHandler
Constructor Summary |
protected |
AbstractWriteResponseHandler(java.util.Collection<java.net.InetAddress> writeEndpoints,
org.apache.cassandra.thrift.ConsistencyLevel consistencyLevel)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
condition
protected final SimpleCondition condition
startTime
protected final long startTime
writeEndpoints
protected final java.util.Collection<java.net.InetAddress> writeEndpoints
consistencyLevel
protected final org.apache.cassandra.thrift.ConsistencyLevel consistencyLevel
hintFutures
protected java.util.List<CreationTimeAwareFuture<?>> hintFutures
AbstractWriteResponseHandler
protected AbstractWriteResponseHandler(java.util.Collection<java.net.InetAddress> writeEndpoints,
org.apache.cassandra.thrift.ConsistencyLevel consistencyLevel)
get
public void get()
throws java.util.concurrent.TimeoutException
- Specified by:
get
in interface IWriteResponseHandler
- Throws:
java.util.concurrent.TimeoutException
addFutureForHint
public void addFutureForHint(CreationTimeAwareFuture<?> hintFuture)
- Specified by:
addFutureForHint
in interface IWriteResponseHandler
waitForHints
protected static void waitForHints(java.util.List<CreationTimeAwareFuture<?>> hintFutures)
throws java.util.concurrent.TimeoutException
- Throws:
java.util.concurrent.TimeoutException
response
public abstract void response(Message msg)
- null message means "response from local write"
- Specified by:
response
in interface IAsyncCallback
- Parameters:
msg
- response received.
assureSufficientLiveNodes
public abstract void assureSufficientLiveNodes()
throws org.apache.cassandra.thrift.UnavailableException
- Specified by:
assureSufficientLiveNodes
in interface IWriteResponseHandler
- Throws:
org.apache.cassandra.thrift.UnavailableException
Copyright © 2011 The Apache Software Foundation