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

    Fields
    Modifier and Type
    Field
    Description
    private final CellBlockBuilder
     
    private final Codec
     
    private final org.apache.hadoop.io.compress.CompressionCodec
     
    private final NettyRpcConnection
     
    private final Map<Integer,Call>
     
    private static final org.slf4j.Logger
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    NettyRpcDuplexHandler(NettyRpcConnection conn, CellBlockBuilder cellBlockBuilder, Codec codec, org.apache.hadoop.io.compress.CompressionCodec compressor)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    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
     
    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

  • Constructor Details

  • 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 interface org.apache.hbase.thirdparty.io.netty.channel.ChannelOutboundHandler
      Overrides:
      write in class org.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 interface org.apache.hbase.thirdparty.io.netty.channel.ChannelInboundHandler
      Overrides:
      channelRead in class org.apache.hbase.thirdparty.io.netty.channel.ChannelInboundHandlerAdapter
      Throws:
      Exception
    • cleanupCalls

      private void cleanupCalls(IOException error)
    • channelInactive

      public void channelInactive(org.apache.hbase.thirdparty.io.netty.channel.ChannelHandlerContext ctx) throws Exception
      Specified by:
      channelInactive in interface org.apache.hbase.thirdparty.io.netty.channel.ChannelInboundHandler
      Overrides:
      channelInactive in class org.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 interface org.apache.hbase.thirdparty.io.netty.channel.ChannelHandler
      Specified by:
      exceptionCaught in interface org.apache.hbase.thirdparty.io.netty.channel.ChannelInboundHandler
      Overrides:
      exceptionCaught in class org.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 interface org.apache.hbase.thirdparty.io.netty.channel.ChannelInboundHandler
      Overrides:
      userEventTriggered in class org.apache.hbase.thirdparty.io.netty.channel.ChannelInboundHandlerAdapter
      Throws:
      Exception