public class DigestResolver extends ResponseResolver
command, consistency, keyspace, logger, responses
Constructor and Description |
---|
DigestResolver(Keyspace keyspace,
ReadCommand command,
ConsistencyLevel consistency,
int maxResponseCount) |
Modifier and Type | Method and Description |
---|---|
void |
compareResponses()
Compares received responses, potentially triggering a digest mismatch (for a digest resolver) and read-repairs
(for a data resolver).
|
PartitionIterator |
getData()
Special case of resolve() so that CL.ONE reads never throw DigestMismatchException in the foreground
|
boolean |
isDataPresent() |
void |
preprocess(MessageIn<ReadResponse> message) |
PartitionIterator |
resolve() |
getMessages
public DigestResolver(Keyspace keyspace, ReadCommand command, ConsistencyLevel consistency, int maxResponseCount)
public void preprocess(MessageIn<ReadResponse> message)
preprocess
in class ResponseResolver
public PartitionIterator getData()
getData
in class ResponseResolver
public PartitionIterator resolve() throws DigestMismatchException
resolve
in class ResponseResolver
DigestMismatchException
public void compareResponses() throws DigestMismatchException
ResponseResolver
This is functionally equivalent to calling ResponseResolver.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.
compareResponses
in class ResponseResolver
DigestMismatchException
- if it's a digest resolver and the responses don't match.public boolean isDataPresent()
isDataPresent
in class ResponseResolver
Copyright © 2017 The Apache Software Foundation