Package org.apache.hadoop.hbase.ipc
Class NettyRpcDuplexHandler
java.lang.Object
org.apache.hbase.thirdparty.io.netty.channel.ChannelHandlerAdapter
org.apache.hbase.thirdparty.io.netty.channel.ChannelInboundHandlerAdapter
org.apache.hbase.thirdparty.io.netty.channel.ChannelDuplexHandler
org.apache.hadoop.hbase.ipc.NettyRpcDuplexHandler
- All Implemented Interfaces:
org.apache.hbase.thirdparty.io.netty.channel.ChannelHandler
,org.apache.hbase.thirdparty.io.netty.channel.ChannelInboundHandler
,org.apache.hbase.thirdparty.io.netty.channel.ChannelOutboundHandler
@Private
class NettyRpcDuplexHandler
extends org.apache.hbase.thirdparty.io.netty.channel.ChannelDuplexHandler
The netty rpc handler.
- Since:
- 2.0.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.hbase.thirdparty.io.netty.channel.ChannelHandler
org.apache.hbase.thirdparty.io.netty.channel.ChannelHandler.Sharable
-
Field Summary
Modifier and TypeFieldDescriptionprivate final CellBlockBuilder
private final Codec
private final org.apache.hadoop.io.compress.CompressionCodec
private final NettyRpcConnection
private static final org.slf4j.Logger
-
Constructor Summary
ConstructorDescriptionNettyRpcDuplexHandler
(NettyRpcConnection conn, CellBlockBuilder cellBlockBuilder, Codec codec, org.apache.hadoop.io.compress.CompressionCodec compressor) -
Method Summary
Modifier and TypeMethodDescriptionvoid
channelInactive
(org.apache.hbase.thirdparty.io.netty.channel.ChannelHandlerContext ctx) void
channelRead
(org.apache.hbase.thirdparty.io.netty.channel.ChannelHandlerContext ctx, Object msg) private void
cleanupCalls
(IOException error) void
exceptionCaught
(org.apache.hbase.thirdparty.io.netty.channel.ChannelHandlerContext ctx, Throwable cause) private void
readResponse
(org.apache.hbase.thirdparty.io.netty.channel.ChannelHandlerContext ctx, org.apache.hbase.thirdparty.io.netty.buffer.ByteBuf buf) void
userEventTriggered
(org.apache.hbase.thirdparty.io.netty.channel.ChannelHandlerContext ctx, Object evt) void
write
(org.apache.hbase.thirdparty.io.netty.channel.ChannelHandlerContext ctx, Object msg, org.apache.hbase.thirdparty.io.netty.channel.ChannelPromise promise) private void
writeRequest
(org.apache.hbase.thirdparty.io.netty.channel.ChannelHandlerContext ctx, Call call, org.apache.hbase.thirdparty.io.netty.channel.ChannelPromise promise) Methods inherited from class org.apache.hbase.thirdparty.io.netty.channel.ChannelDuplexHandler
bind, close, connect, deregister, disconnect, flush, read
Methods inherited from class org.apache.hbase.thirdparty.io.netty.channel.ChannelInboundHandlerAdapter
channelActive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged
Methods inherited from class org.apache.hbase.thirdparty.io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerAdded, handlerRemoved, isSharable
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.hbase.thirdparty.io.netty.channel.ChannelHandler
handlerAdded, handlerRemoved
-
Field Details
-
LOG
-
conn
-
cellBlockBuilder
-
codec
-
compressor
-
id2Call
-
-
Constructor Details
-
NettyRpcDuplexHandler
public NettyRpcDuplexHandler(NettyRpcConnection conn, CellBlockBuilder cellBlockBuilder, Codec codec, org.apache.hadoop.io.compress.CompressionCodec compressor)
-
-
Method Details
-
writeRequest
private void writeRequest(org.apache.hbase.thirdparty.io.netty.channel.ChannelHandlerContext ctx, Call call, org.apache.hbase.thirdparty.io.netty.channel.ChannelPromise promise) throws IOException - Throws:
IOException
-
write
public void write(org.apache.hbase.thirdparty.io.netty.channel.ChannelHandlerContext ctx, Object msg, org.apache.hbase.thirdparty.io.netty.channel.ChannelPromise promise) throws Exception - Specified by:
write
in interfaceorg.apache.hbase.thirdparty.io.netty.channel.ChannelOutboundHandler
- Overrides:
write
in classorg.apache.hbase.thirdparty.io.netty.channel.ChannelDuplexHandler
- Throws:
Exception
-
readResponse
private void readResponse(org.apache.hbase.thirdparty.io.netty.channel.ChannelHandlerContext ctx, org.apache.hbase.thirdparty.io.netty.buffer.ByteBuf buf) throws IOException - Throws:
IOException
-
channelRead
public void channelRead(org.apache.hbase.thirdparty.io.netty.channel.ChannelHandlerContext ctx, Object msg) throws Exception - Specified by:
channelRead
in interfaceorg.apache.hbase.thirdparty.io.netty.channel.ChannelInboundHandler
- Overrides:
channelRead
in classorg.apache.hbase.thirdparty.io.netty.channel.ChannelInboundHandlerAdapter
- Throws:
Exception
-
cleanupCalls
-
channelInactive
public void channelInactive(org.apache.hbase.thirdparty.io.netty.channel.ChannelHandlerContext ctx) throws Exception - Specified by:
channelInactive
in interfaceorg.apache.hbase.thirdparty.io.netty.channel.ChannelInboundHandler
- Overrides:
channelInactive
in classorg.apache.hbase.thirdparty.io.netty.channel.ChannelInboundHandlerAdapter
- Throws:
Exception
-
exceptionCaught
public void exceptionCaught(org.apache.hbase.thirdparty.io.netty.channel.ChannelHandlerContext ctx, Throwable cause) - Specified by:
exceptionCaught
in interfaceorg.apache.hbase.thirdparty.io.netty.channel.ChannelHandler
- Specified by:
exceptionCaught
in interfaceorg.apache.hbase.thirdparty.io.netty.channel.ChannelInboundHandler
- Overrides:
exceptionCaught
in classorg.apache.hbase.thirdparty.io.netty.channel.ChannelInboundHandlerAdapter
-
userEventTriggered
public void userEventTriggered(org.apache.hbase.thirdparty.io.netty.channel.ChannelHandlerContext ctx, Object evt) throws Exception - Specified by:
userEventTriggered
in interfaceorg.apache.hbase.thirdparty.io.netty.channel.ChannelInboundHandler
- Overrides:
userEventTriggered
in classorg.apache.hbase.thirdparty.io.netty.channel.ChannelInboundHandlerAdapter
- Throws:
Exception
-