public class ReadCallback<TMessage,TResolved> extends java.lang.Object implements IAsyncCallback<TMessage>
Modifier and Type | Field and Description |
---|---|
protected static org.slf4j.Logger |
logger |
IResponseResolver<TMessage,TResolved> |
resolver |
isAlive
Constructor and Description |
---|
ReadCallback(IResponseResolver<TMessage,TResolved> resolver,
ConsistencyLevel consistencyLevel,
IReadCommand command,
java.util.List<java.net.InetAddress> filteredEndpoints)
Constructor when response count has to be calculated and blocked for.
|
Modifier and Type | Method and Description |
---|---|
void |
assureSufficientLiveNodes() |
boolean |
await(long timePastStart,
java.util.concurrent.TimeUnit unit) |
TResolved |
get() |
int |
getReceivedCount() |
boolean |
isLatencyForSnitch() |
protected void |
maybeResolveForRepair()
Check digests in the background on the Repair stage if we've received replies
too all the requests we sent.
|
void |
response(MessageIn<TMessage> message) |
void |
response(TMessage result) |
ReadCallback<TMessage,TResolved> |
withNewResolver(IResponseResolver<TMessage,TResolved> newResolver) |
protected static final org.slf4j.Logger logger
public final IResponseResolver<TMessage,TResolved> resolver
public ReadCallback(IResponseResolver<TMessage,TResolved> resolver, ConsistencyLevel consistencyLevel, IReadCommand command, java.util.List<java.net.InetAddress> filteredEndpoints)
public ReadCallback<TMessage,TResolved> withNewResolver(IResponseResolver<TMessage,TResolved> newResolver)
public boolean await(long timePastStart, java.util.concurrent.TimeUnit unit)
public TResolved get() throws ReadTimeoutException, DigestMismatchException
public void response(MessageIn<TMessage> message)
response
in interface IAsyncCallback<TMessage>
message
- response received.public int getReceivedCount()
public void response(TMessage result)
protected void maybeResolveForRepair()
public void assureSufficientLiveNodes() throws UnavailableException
UnavailableException
public boolean isLatencyForSnitch()
isLatencyForSnitch
in interface IAsyncCallback<TMessage>
Copyright © 2013 The Apache Software Foundation