public abstract class AbstractReadExecutor
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected ReadCommand |
command |
protected ReadCallback<ReadResponse,Row> |
handler |
protected RowDigestResolver |
resolver |
protected java.util.List<java.net.InetAddress> |
targetReplicas |
Modifier and Type | Method and Description |
---|---|
abstract void |
executeAsync()
send the initial set of requests
|
Row |
get()
wait for an answer.
|
abstract java.util.Collection<java.net.InetAddress> |
getContactedReplicas()
Get the replicas involved in the [finished] request.
|
static AbstractReadExecutor |
getReadExecutor(ReadCommand command,
ConsistencyLevel consistencyLevel) |
protected void |
makeDataRequests(java.lang.Iterable<java.net.InetAddress> endpoints) |
protected void |
makeDigestRequests(java.lang.Iterable<java.net.InetAddress> endpoints) |
abstract void |
maybeTryAdditionalReplicas()
Perform additional requests if it looks like the original will time out.
|
protected final ReadCommand command
protected final java.util.List<java.net.InetAddress> targetReplicas
protected final RowDigestResolver resolver
protected final ReadCallback<ReadResponse,Row> handler
protected void makeDataRequests(java.lang.Iterable<java.net.InetAddress> endpoints)
protected void makeDigestRequests(java.lang.Iterable<java.net.InetAddress> endpoints)
public abstract void maybeTryAdditionalReplicas()
public abstract java.util.Collection<java.net.InetAddress> getContactedReplicas()
public abstract void executeAsync()
public Row get() throws ReadTimeoutException, DigestMismatchException
public static AbstractReadExecutor getReadExecutor(ReadCommand command, ConsistencyLevel consistencyLevel) throws UnavailableException
UnavailableException
Copyright © 2015 The Apache Software Foundation