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
FieldsModifier and TypeFieldDescriptionprivate final CellBlockBuilderprivate final Codecprivate final org.apache.hadoop.io.compress.CompressionCodecprivate final NettyRpcConnectionprivate static final org.slf4j.Logger -
Constructor Summary
ConstructorsConstructorDescriptionNettyRpcDuplexHandler(NettyRpcConnection conn, CellBlockBuilder cellBlockBuilder, Codec codec, org.apache.hadoop.io.compress.CompressionCodec compressor) -
Method Summary
Modifier and TypeMethodDescriptionvoidchannelInactive(org.apache.hbase.thirdparty.io.netty.channel.ChannelHandlerContext ctx) voidchannelRead(org.apache.hbase.thirdparty.io.netty.channel.ChannelHandlerContext ctx, Object msg) private voidcleanupCalls(IOException error) voidexceptionCaught(org.apache.hbase.thirdparty.io.netty.channel.ChannelHandlerContext ctx, Throwable cause) private voidreadResponse(org.apache.hbase.thirdparty.io.netty.channel.ChannelHandlerContext ctx, org.apache.hbase.thirdparty.io.netty.buffer.ByteBuf buf) voiduserEventTriggered(org.apache.hbase.thirdparty.io.netty.channel.ChannelHandlerContext ctx, Object evt) voidwrite(org.apache.hbase.thirdparty.io.netty.channel.ChannelHandlerContext ctx, Object msg, org.apache.hbase.thirdparty.io.netty.channel.ChannelPromise promise) private voidwriteRequest(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, readMethods inherited from class org.apache.hbase.thirdparty.io.netty.channel.ChannelInboundHandlerAdapter
channelActive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChangedMethods inherited from class org.apache.hbase.thirdparty.io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerAdded, handlerRemoved, isSharableMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
writein interfaceorg.apache.hbase.thirdparty.io.netty.channel.ChannelOutboundHandler- Overrides:
writein 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:
channelReadin interfaceorg.apache.hbase.thirdparty.io.netty.channel.ChannelInboundHandler- Overrides:
channelReadin 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:
channelInactivein interfaceorg.apache.hbase.thirdparty.io.netty.channel.ChannelInboundHandler- Overrides:
channelInactivein 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:
exceptionCaughtin interfaceorg.apache.hbase.thirdparty.io.netty.channel.ChannelHandler- Specified by:
exceptionCaughtin interfaceorg.apache.hbase.thirdparty.io.netty.channel.ChannelInboundHandler- Overrides:
exceptionCaughtin 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:
userEventTriggeredin interfaceorg.apache.hbase.thirdparty.io.netty.channel.ChannelInboundHandler- Overrides:
userEventTriggeredin classorg.apache.hbase.thirdparty.io.netty.channel.ChannelInboundHandlerAdapter- Throws:
Exception
-