@InterfaceAudience.Private class NettyRpcConnection extends RpcConnection
eventLoop thread, otherwise there will be races.| Modifier and Type | Field and Description |
|---|---|
private org.apache.hbase.thirdparty.io.netty.channel.Channel |
channel |
private org.apache.hbase.thirdparty.io.netty.buffer.ByteBuf |
connectionHeaderPreamble |
private org.apache.hbase.thirdparty.io.netty.buffer.ByteBuf |
connectionHeaderWithLength |
private org.apache.hbase.thirdparty.io.netty.channel.EventLoop |
eventLoop |
private static org.slf4j.Logger |
LOG |
private static ScheduledExecutorService |
RELOGIN_EXECUTOR |
private boolean |
reloginInProgress |
private NettyRpcClient |
rpcClient |
codec, compressor, conf, CRYPTO_AES_ENABLED_DEFAULT, CRYPTO_AES_ENABLED_KEY, lastTouched, provider, reloginMaxBackoff, remoteId, securityInfo, serverAddress, timeoutTimer, token, useSasl| Constructor and Description |
|---|
NettyRpcConnection(NettyRpcClient rpcClient,
ConnectionId remoteId) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
callTimeout(Call call) |
void |
cleanupConnection()
Does the clean up work after the connection is removed from the connection pool
|
private void |
connect() |
private void |
established(org.apache.hbase.thirdparty.io.netty.channel.Channel ch) |
private void |
failInit(org.apache.hbase.thirdparty.io.netty.channel.Channel ch,
IOException e) |
boolean |
isActive()
Tell the idle connection sweeper whether we could be swept.
|
private void |
saslNegotiate(org.apache.hbase.thirdparty.io.netty.channel.Channel ch) |
private void |
scheduleRelogin(Throwable error) |
void |
sendRequest(Call call,
HBaseRpcController hrc) |
private void |
sendRequest0(Call call,
HBaseRpcController hrc) |
void |
shutdown()
Just close connection.
|
private void |
shutdown0() |
getConnectionHeader, getConnectionHeaderPreamble, getLastTouched, remoteId, scheduleTimeoutTask, setLastTouchedprivate static final org.slf4j.Logger LOG
private static final ScheduledExecutorService RELOGIN_EXECUTOR
private final NettyRpcClient rpcClient
private final org.apache.hbase.thirdparty.io.netty.channel.EventLoop eventLoop
private org.apache.hbase.thirdparty.io.netty.buffer.ByteBuf connectionHeaderPreamble
private org.apache.hbase.thirdparty.io.netty.buffer.ByteBuf connectionHeaderWithLength
private volatile org.apache.hbase.thirdparty.io.netty.channel.Channel channel
private boolean reloginInProgress
NettyRpcConnection(NettyRpcClient rpcClient, ConnectionId remoteId) throws IOException
IOExceptionprotected void callTimeout(Call call)
callTimeout in class RpcConnectionpublic boolean isActive()
RpcConnectionisActive in class RpcConnectionprivate void shutdown0()
public void shutdown()
RpcConnectionshutdown in class RpcConnectionpublic void cleanupConnection()
RpcConnectioncleanupConnection in class RpcConnectionprivate void established(org.apache.hbase.thirdparty.io.netty.channel.Channel ch) throws IOException
IOExceptionprivate void scheduleRelogin(Throwable error)
private void failInit(org.apache.hbase.thirdparty.io.netty.channel.Channel ch, IOException e)
private void saslNegotiate(org.apache.hbase.thirdparty.io.netty.channel.Channel ch)
private void connect()
private void sendRequest0(Call call, HBaseRpcController hrc) throws IOException
IOExceptionpublic void sendRequest(Call call, HBaseRpcController hrc)
sendRequest in class RpcConnectionCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.