public abstract class ResponseResolver
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected ReadCommand |
command |
protected ConsistencyLevel |
consistency |
protected Keyspace |
keyspace |
protected static org.slf4j.Logger |
logger |
protected Accumulator<MessageIn<ReadResponse>> |
responses |
Constructor and Description |
---|
ResponseResolver(Keyspace keyspace,
ReadCommand command,
ConsistencyLevel consistency,
int maxResponseCount) |
Modifier and Type | Method and Description |
---|---|
abstract void |
compareResponses()
Compares received responses, potentially triggering a digest mismatch (for a digest resolver) and read-repairs
(for a data resolver).
|
abstract PartitionIterator |
getData() |
java.lang.Iterable<MessageIn<ReadResponse>> |
getMessages() |
abstract boolean |
isDataPresent() |
void |
preprocess(MessageIn<ReadResponse> message) |
abstract PartitionIterator |
resolve() |
protected static final org.slf4j.Logger logger
protected final Keyspace keyspace
protected final ReadCommand command
protected final ConsistencyLevel consistency
protected final Accumulator<MessageIn<ReadResponse>> responses
public ResponseResolver(Keyspace keyspace, ReadCommand command, ConsistencyLevel consistency, int maxResponseCount)
public abstract PartitionIterator getData()
public abstract PartitionIterator resolve() throws DigestMismatchException
DigestMismatchException
public abstract void compareResponses() throws DigestMismatchException
This is functionally equivalent to calling resolve()
and consuming the result, but can be slightly more
efficient in some case due to the fact that we don't care about the result itself. This is used when doing
asynchronous read-repairs.
DigestMismatchException
- if it's a digest resolver and the responses don't match.public abstract boolean isDataPresent()
public void preprocess(MessageIn<ReadResponse> message)
public java.lang.Iterable<MessageIn<ReadResponse>> getMessages()
Copyright © 2009- The Apache Software Foundation