Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.cassandra.service
Class DatacenterReadCallback<T>

    java.lang.Object
      org.apache.cassandra.service.ReadCallback<T>
          org.apache.cassandra.service.DatacenterReadCallback<T>

All Implemented Interfaces:
  IAsyncCallback, IMessageCallback

    public class DatacenterReadCallback<T>

extends ReadCallback<T>

Datacenter Quorum response handler blocks for a quorum of responses from the local DC

Field Summary

Fields inherited from class org.apache.cassandra.service.ReadCallback
`blockfor, condition, logger, received, resolver`

Constructor Summary
`DatacenterReadCallback(IResponseResolver resolver, ConsistencyLevel consistencyLevel, IReadCommand command, java.util.List<java.net.InetAddress> endpoints)`

Method Summary
`void` | `assureSufficientLiveNodes()`
`int` | `determineBlockFor(ConsistencyLevel consistency_level, java.lang.String table)`
`protected java.util.List<java.net.InetAddress>` | `preferredEndpoints(java.util.List<java.net.InetAddress> endpoints)`
`protected boolean` | `waitingFor(Message message)`
`protected boolean` | `waitingFor(ReadResponse response)`

Methods inherited from class org.apache.cassandra.service.ReadCallback
`get, isLatencyForSnitch, maybeResolveForRepair, response, response`

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

Constructor Detail

### DatacenterReadCallback

    public DatacenterReadCallback(IResponseResolver resolver,
                                  ConsistencyLevel consistencyLevel,
                                  IReadCommand command,
                                  java.util.List<java.net.InetAddress> endpoints)

Method Detail

### preferredEndpoints

    protected java.util.List<java.net.InetAddress> preferredEndpoints(java.util.List<java.net.InetAddress> endpoints)

  Overrides:
    `preferredEndpoints` in class `ReadCallback<T>`

### waitingFor

    protected boolean waitingFor(Message message)

  Overrides:
    `waitingFor` in class `ReadCallback<T>`
  Returns:
    true if the message counts towards the blockfor threshold TODO turn the Message into a response so we don't need two versions of this method

### waitingFor

    protected boolean waitingFor(ReadResponse response)

  Overrides:
    `waitingFor` in class `ReadCallback<T>`
  Returns:
    true if the response counts towards the blockfor threshold

### determineBlockFor

    public int determineBlockFor(ConsistencyLevel consistency_level,
                                 java.lang.String table)

  Overrides:
    `determineBlockFor` in class `ReadCallback<T>`

### assureSufficientLiveNodes

    public void assureSufficientLiveNodes()
                                   throws UnavailableException

  Overrides:
    `assureSufficientLiveNodes` in class `ReadCallback<T>`
  Throws:
    `UnavailableException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2011 The Apache Software Foundation