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,
int blockfor,
IReadCommand command,
Keyspace keyspace,
java.util.List<java.net.InetAddress> endpoints) |
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() |
void |
response(MessageIn<TMessage> message) |
void |
response(TMessage result) |
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(IResponseResolver<TMessage,TResolved> resolver, ConsistencyLevel consistencyLevel, int blockfor, IReadCommand command, Keyspace keyspace, java.util.List<java.net.InetAddress> endpoints)
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)
public void assureSufficientLiveNodes() throws UnavailableException
UnavailableException
public boolean isLatencyForSnitch()
isLatencyForSnitch
in interface IAsyncCallback<TMessage>
Copyright © 2015 The Apache Software Foundation