## org.apache.cassandra.service
Class DatacenterWriteResponseHandler

    java.lang.Object
      org.apache.cassandra.service.AbstractWriteResponseHandler
          org.apache.cassandra.service.WriteResponseHandler
              org.apache.cassandra.service.DatacenterWriteResponseHandler

All Implemented Interfaces:
  IAsyncCallback, IMessageCallback, IWriteResponseHandler

    public class DatacenterWriteResponseHandler

extends WriteResponseHandler

This class blocks for a quorum of responses _in the local datacenter only_ (CL.LOCAL_QUORUM).

Field Summary

Fields inherited from class org.apache.cassandra.service.WriteResponseHandler
`logger, responses`

Fields inherited from class org.apache.cassandra.service.AbstractWriteResponseHandler
`callback, consistencyLevel, startTime, writeEndpoints`

Constructor Summary
`protected` `DatacenterWriteResponseHandler(java.util.Collection<java.net.InetAddress> writeEndpoints, ConsistencyLevel consistencyLevel, java.lang.String table, java.lang.Runnable callback)`

Method Summary
`void` `assureSufficientLiveNodes()`
`static IWriteResponseHandler` `create(java.util.Collection<java.net.InetAddress> writeEndpoints, ConsistencyLevel consistencyLevel, java.lang.String table, java.lang.Runnable callback)`
`protected int` `determineBlockFor(java.lang.String table)`
`void` `response(Message message)` null message means "response from local write"

Methods inherited from class org.apache.cassandra.service.WriteResponseHandler
`create, isLatencyForSnitch`

Methods inherited from class org.apache.cassandra.service.AbstractWriteResponseHandler
`get, signal`

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

Constructor Detail

### DatacenterWriteResponseHandler

    protected DatacenterWriteResponseHandler(java.util.Collection<java.net.InetAddress> writeEndpoints,
                                             ConsistencyLevel consistencyLevel,
                                             java.lang.String table,
                                             java.lang.Runnable callback)

Method Detail

### create

    public static IWriteResponseHandler create(java.util.Collection<java.net.InetAddress> writeEndpoints,
                                               ConsistencyLevel consistencyLevel,
                                               java.lang.String table,
                                               java.lang.Runnable callback)

### determineBlockFor

    protected int determineBlockFor(java.lang.String table)

  Overrides:
    `determineBlockFor` in class `WriteResponseHandler`

### response

    public void response(Message message)

  Description copied from class: `AbstractWriteResponseHandler`
  null message means "response from local write"

  Specified by:
    `response` in interface `IAsyncCallback`
  Overrides:
    `response` in class `WriteResponseHandler`
  Parameters:
    `message` - response received.

### assureSufficientLiveNodes

    public void assureSufficientLiveNodes()
                                   throws UnavailableException

  Specified by:
    `assureSufficientLiveNodes` in interface `IWriteResponseHandler`
  Overrides:
    `assureSufficientLiveNodes` in class `WriteResponseHandler`
  Throws:
    `UnavailableException`

Copyright © 2013 The Apache Software Foundation