public abstract class ServerCallable<T> extends Object
| Modifier and Type | Field and Description |
|---|---|
protected InetSocketAddress |
addr |
protected boolean |
asyncMode |
protected boolean |
closeConn |
protected long |
endTime |
protected RpcClientManager |
manager |
protected Class<?> |
protocol |
protected long |
startTime |
| Constructor and Description |
|---|
ServerCallable(RpcClientManager manager,
InetSocketAddress addr,
Class<?> protocol,
boolean asyncMode) |
| Modifier and Type | Method and Description |
|---|---|
void |
abort() |
void |
afterCall() |
void |
beforeCall() |
abstract T |
call(NettyClientBase client) |
long |
getEndTime() |
long |
getStartTime() |
T |
withoutRetries()
Run this instance against the server once.
|
T |
withRetries()
Run this instance with retries, timed waits,
and refinds of missing regions.
|
protected InetSocketAddress addr
protected long startTime
protected long endTime
protected Class<?> protocol
protected boolean asyncMode
protected boolean closeConn
protected RpcClientManager manager
public ServerCallable(RpcClientManager manager, InetSocketAddress addr, Class<?> protocol, boolean asyncMode)
public abstract T call(NettyClientBase client) throws Exception
Exceptionpublic void beforeCall()
public long getStartTime()
public void afterCall()
public long getEndTime()
public void abort()
public T withRetries() throws com.google.protobuf.ServiceException
com.google.protobuf.ServiceException - if a remote or network exception occurspublic T withoutRetries() throws IOException, RuntimeException
IOException - if a remote or network exception occursRuntimeException - other unspecified errorCopyright © 2015 Apache Software Foundation. All Rights Reserved.