public abstract class ServerCallable<T> extends Object
Modifier and Type | Field and Description |
---|---|
protected InetSocketAddress |
addr |
protected boolean |
asyncMode |
protected boolean |
closeConn |
protected RpcConnectionPool |
connPool |
protected long |
endTime |
protected Class |
protocol |
protected long |
startTime |
Constructor and Description |
---|
ServerCallable(RpcConnectionPool connPool,
InetSocketAddress addr,
Class protocol,
boolean asyncMode) |
ServerCallable(RpcConnectionPool connPool,
InetSocketAddress addr,
Class protocol,
boolean asyncMode,
boolean closeConn) |
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 RpcConnectionPool connPool
public ServerCallable(RpcConnectionPool connPool, InetSocketAddress addr, Class protocol, boolean asyncMode)
public ServerCallable(RpcConnectionPool connPool, InetSocketAddress addr, Class protocol, boolean asyncMode, boolean closeConn)
public abstract T call(NettyClientBase client) throws Exception
Exception
public void beforeCall()
public long getStartTime()
public void afterCall()
public long getEndTime()
public void abort()
public T withRetries() throws com.google.protobuf.ServiceException
T
- the type of the return valuecom.google.protobuf.ServiceException
- if a remote or network exception occurspublic T withoutRetries() throws IOException, RuntimeException
T
- the type of the return valueIOException
- if a remote or network exception occursRuntimeException
- other unspecified errorCopyright © 2014 Apache Software Foundation. All Rights Reserved.