org.apache.cassandra.service
Class ReadResponseResolver
java.lang.Object
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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ReadResponseResolver
public ReadResponseResolver(java.lang.String table)
resolve
public Row resolve()
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,
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.
preprocess
public void preprocess(Message message)
- Specified by:
preprocess
in interface IResponseResolver<Row>
injectPreProcessed
public void injectPreProcessed(Message message,
ReadResponse result)
- hack so ConsistencyChecker doesn't have to serialize/deserialize an extra real Message
isDataPresent
public boolean isDataPresent()
- Specified by:
isDataPresent
in interface IResponseResolver<Row>
getMessages
public java.lang.Iterable<Message> getMessages()
- Specified by:
getMessages
in interface IResponseResolver<Row>
getMessageCount
public int getMessageCount()
- Specified by:
getMessageCount
in interface IResponseResolver<Row>
Copyright © 2010 The Apache Software Foundation