org.apache.cassandra.service

## Class DatacenterSyncWriteResponseHandler<T>

- java.lang.Object
- - org.apache.cassandra.service.AbstractWriteResponseHandler<T>
  - - org.apache.cassandra.service.DatacenterSyncWriteResponseHandler<T>

All Implemented Interfaces:
  IAsyncCallback<T>, IAsyncCallbackWithFailure<T>

    public class DatacenterSyncWriteResponseHandler<T>
    extends AbstractWriteResponseHandler<T>

This class blocks for a quorum of responses _in all datacenters_ (CL.EACH_QUORUM).

### Field Summary

### Fields inherited from class org.apache.cassandra.service.AbstractWriteResponseHandler

`callback, consistencyLevel, keyspace, logger, naturalEndpoints, pendingEndpoints, writeType`

### Fields inherited from interface org.apache.cassandra.net.IAsyncCallback

`isAlive`

### Constructor Summary

Constructors
Constructor and Description
`DatacenterSyncWriteResponseHandler(java.util.Collection<java.net.InetAddress> naturalEndpoints, java.util.Collection<java.net.InetAddress> pendingEndpoints, ConsistencyLevel consistencyLevel, Keyspace keyspace, java.lang.Runnable callback, WriteType writeType, long queryStartNanoTime)`

### Method Summary

All Methods Instance Methods Concrete Methods
`protected int` `ackCount()`
`boolean` `isLatencyForSnitch()`
`void` `response(MessageIn<T> message)` null message means "response from local write"

### Methods inherited from class org.apache.cassandra.service.AbstractWriteResponseHandler

`assureSufficientLiveNodes, currentTimeout, get, onFailure, setSupportsBackPressure, signal, supportsBackPressure, totalBlockFor, totalEndpoints, waitingFor`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### DatacenterSyncWriteResponseHandler

    public DatacenterSyncWriteResponseHandler(java.util.Collection<java.net.InetAddress> naturalEndpoints,
                                              java.util.Collection<java.net.InetAddress> pendingEndpoints,
                                              ConsistencyLevel consistencyLevel,
                                              Keyspace keyspace,
                                              java.lang.Runnable callback,
                                              WriteType writeType,
                                              long queryStartNanoTime)

### Method Detail

#### response

    public void response(MessageIn<T> message)

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

Specified by:
  `response` in interface `IAsyncCallback<T>`
Specified by:
  `response` in class `AbstractWriteResponseHandler<T>`
Parameters:
  `message` - response received.

#### ackCount

    protected int ackCount()

Specified by:
  `ackCount` in class `AbstractWriteResponseHandler<T>`
Returns:
  number of responses received

#### isLatencyForSnitch

    public boolean isLatencyForSnitch()

Returns:
  true if this callback is on the read path and its latency should be given as input to the dynamic snitch.