org.apache.cassandra.service
Class RowRepairResolver

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

public class RowRepairResolver
extends AbstractRowResolver


Field Summary
 
Fields inherited from class org.apache.cassandra.service.AbstractRowResolver
key, logger, replies, table
 
Constructor Summary
RowRepairResolver(java.lang.String table, java.nio.ByteBuffer key)
           
 
Method Summary
 Row getData()
          returns the data response without comparing with any digests
 boolean isDataPresent()
           
static void maybeScheduleRepairs(ColumnFamily resolved, java.lang.String table, DecoratedKey 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()
          This Method resolves the responses that are passed in .
 
Methods inherited from class org.apache.cassandra.service.AbstractRowResolver
getMessages, injectPreProcessed, preprocess
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RowRepairResolver

public RowRepairResolver(java.lang.String table,
                         java.nio.ByteBuffer key)
Method Detail

resolve

public Row resolve()
            throws DigestMismatchException,
                   java.io.IOException
Description copied from interface: IResponseResolver
This Method resolves the responses that are passed in . for example : if its write response then all we get is true or false return values which implies if the writes were successful but for reads its more complicated you need to look at the responses and then based on differences schedule repairs . Hence you need to derive a response resolver based on your needs from this interface.

Throws:
DigestMismatchException
java.io.IOException

maybeScheduleRepairs

public static void maybeScheduleRepairs(ColumnFamily resolved,
                                        java.lang.String table,
                                        DecoratedKey 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.


getData

public Row getData()
            throws java.io.IOException
Description copied from interface: IResponseResolver
returns the data response without comparing with any digests

Throws:
java.io.IOException

isDataPresent

public boolean isDataPresent()


Copyright © 2011 The Apache Software Foundation