Class BufferCallBeforeInitHandler

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.BufferCallBeforeInitHandler
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 BufferCallBeforeInitHandler extends org.apache.hbase.thirdparty.io.netty.channel.ChannelDuplexHandler
We will expose the connection to upper layer before initialized, so we need to buffer the calls passed in and write them out once the connection is established.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    private static enum 
     
    static final class 
     

    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 Map<Integer,Call>
     
    private static final org.slf4j.Logger
     
    (package private) static final String
     
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    exceptionCaught(org.apache.hbase.thirdparty.io.netty.channel.ChannelHandlerContext ctx, Throwable cause)
     
    void
    flush(org.apache.hbase.thirdparty.io.netty.channel.ChannelHandlerContext ctx)
     
    private boolean
     
    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)
     

    Methods inherited from class org.apache.hbase.thirdparty.io.netty.channel.ChannelDuplexHandler

    bind, close, connect, deregister, disconnect, read

    Methods inherited from class org.apache.hbase.thirdparty.io.netty.channel.ChannelInboundHandlerAdapter

    channelActive, channelInactive, channelRead, 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

    • write

      public void write(org.apache.hbase.thirdparty.io.netty.channel.ChannelHandlerContext ctx, Object msg, org.apache.hbase.thirdparty.io.netty.channel.ChannelPromise promise)
      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
    • flush

      public void flush(org.apache.hbase.thirdparty.io.netty.channel.ChannelHandlerContext ctx) throws Exception
      Specified by:
      flush in interface org.apache.hbase.thirdparty.io.netty.channel.ChannelOutboundHandler
      Overrides:
      flush in class org.apache.hbase.thirdparty.io.netty.channel.ChannelDuplexHandler
      Throws:
      Exception
    • 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
    • isSslError

      private boolean isSslError(Throwable cause)
    • exceptionCaught

      public void exceptionCaught(org.apache.hbase.thirdparty.io.netty.channel.ChannelHandlerContext ctx, Throwable cause) throws Exception
      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
      Throws:
      Exception