## 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

Field Summary
`protected SimpleCondition` `condition`
`protected ConsistencyLevel` `consistencyLevel`
`protected java.util.List<CreationTimeAwareFuture<?>>` `hintFutures`
`protected long` `startTime`
`protected java.util.Collection<java.net.InetAddress>` `writeEndpoints`

Constructor Summary
`protected` `AbstractWriteResponseHandler(java.util.Collection<java.net.InetAddress> writeEndpoints, ConsistencyLevel consistencyLevel)`

Method Summary
`void` `addFutureForHint(CreationTimeAwareFuture<?> hintFuture)`
`abstract void` `assureSufficientLiveNodes()`
`void` `get()`
`abstract void` `response(Message msg)` null message means "response from local write"
`protected static void` `waitForHints(java.util.List<CreationTimeAwareFuture<?>> hintFutures)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.apache.cassandra.net.IMessageCallback
`isLatencyForSnitch`

Field Detail

### condition

    protected final SimpleCondition condition

### startTime

    protected final long startTime

### writeEndpoints

    protected final java.util.Collection<java.net.InetAddress> writeEndpoints

### consistencyLevel

    protected final ConsistencyLevel consistencyLevel

### hintFutures

    protected java.util.List<CreationTimeAwareFuture<?>> hintFutures

Constructor Detail

### AbstractWriteResponseHandler

    protected AbstractWriteResponseHandler(java.util.Collection<java.net.InetAddress> writeEndpoints,
                                           ConsistencyLevel consistencyLevel)

Method Detail

### 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 UnavailableException

  Specified by:
    `assureSufficientLiveNodes` in interface `IWriteResponseHandler`
  Throws:
    `UnavailableException`

Copyright © 2011 The Apache Software Foundation