org.apache.cassandra.service
Class RowDataResolver

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

public class RowDataResolver
extends AbstractRowResolver


Field Summary
 java.util.List<IAsyncResult> repairResults
           
 
Fields inherited from class org.apache.cassandra.service.AbstractRowResolver
key, logger, replies, table
 
Constructor Summary
RowDataResolver(java.lang.String table, java.nio.ByteBuffer key, IDiskAtomFilter qFilter)
           
 
Method Summary
 Row getData()
          returns the data response without comparing with any digests
 int getMaxLiveCount()
           
 boolean isDataPresent()
           
 Row resolve()
          This Method resolves the responses that are passed in .
static java.util.List<IAsyncResult> scheduleRepairs(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.
 
Methods inherited from class org.apache.cassandra.service.AbstractRowResolver
getMessages, preprocess
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

repairResults

public java.util.List<IAsyncResult> repairResults
Constructor Detail

RowDataResolver

public RowDataResolver(java.lang.String table,
                       java.nio.ByteBuffer key,
                       IDiskAtomFilter qFilter)
Method Detail

resolve

public Row resolve()
            throws DigestMismatchException
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

scheduleRepairs

public static java.util.List<IAsyncResult> scheduleRepairs(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()
Description copied from interface: IResponseResolver
returns the data response without comparing with any digests


isDataPresent

public boolean isDataPresent()

getMaxLiveCount

public int getMaxLiveCount()


Copyright © 2013 The Apache Software Foundation