org.apache.cassandra.service
Class ReadResponseResolver

java.lang.Object
  extended by org.apache.cassandra.service.ReadResponseResolver
All Implemented Interfaces:
IResponseResolver<Row>

public class ReadResponseResolver
extends java.lang.Object
implements IResponseResolver<Row>

Turns ReadResponse messages into Row objects, resolving to the most recent version and setting up read repairs as necessary.


Constructor Summary
ReadResponseResolver(java.lang.String table, int responseCount)
           
 
Method Summary
 boolean isDataPresent(java.util.List<Message> responses)
           
static void maybeScheduleRepairs(ColumnFamily resolved, java.lang.String table, java.lang.String key, java.util.List<ColumnFamily> versions, java.util.List<java.net.InetAddress> endPoints)
          For each row version, compare with resolved (the superset of all row versions); if it is missing anything, send a mutation to the endpoint it come from.
 Row resolve(java.util.List<Message> responses)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReadResponseResolver

public ReadResponseResolver(java.lang.String table,
                            int responseCount)
Method Detail

resolve

public Row resolve(java.util.List<Message> responses)
            throws DigestMismatchException,
                   java.io.IOException
Specified by:
resolve in interface IResponseResolver<Row>
Throws:
DigestMismatchException
java.io.IOException

maybeScheduleRepairs

public static void maybeScheduleRepairs(ColumnFamily resolved,
                                        java.lang.String table,
                                        java.lang.String key,
                                        java.util.List<ColumnFamily> versions,
                                        java.util.List<java.net.InetAddress> endPoints)
For each row version, compare with resolved (the superset of all row versions); if it is missing anything, send a mutation to the endpoint it come from.


isDataPresent

public boolean isDataPresent(java.util.List<Message> responses)
Specified by:
isDataPresent in interface IResponseResolver<Row>


Copyright © 2010 The Apache Software Foundation