Class ElideDuplicateHeadersHandler

  • All Implemented Interfaces:,,

    public class ElideDuplicateHeadersHandler
    A simple cache to reduce the number of duplicate CharSequences held by the HttpHeaders instances. The reason is that the HttpObjectDecoder will instantiate a new String for every part of the header that it encountered we want to facilitate the garbage collector in reaping short life objects. The implementation uses a queue of maps per thread instead of maintaining a LRU structure where initially two maps are added to the queue and at each expire interval, a new empty map is added at the start and an old map is removed from the end. This effectively makes the lifetime of every map to be 2x the expire interval and entries referenced would be inserted into only the map at the head of the queue.
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface
    • Field Summary

      Modifier and Type Field Description
      static INSTANCE  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void channelRead​( ctx, java.lang.Object msg)  
      void write​( ctx, java.lang.Object msg, promise)  
      • Methods inherited from class

        bind, close, connect, deregister, disconnect, flush, read
      • Methods inherited from class

        channelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggered
      • Methods inherited from class

        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

        handlerAdded, handlerRemoved
    • Field Detail

      • INSTANCE

        public static final INSTANCE
    • Method Detail

      • write

        public void write​( ctx,
                          java.lang.Object msg,
                   throws java.lang.Exception
        Specified by:
        write in interface
        write in class
      • channelRead

        public void channelRead​( ctx,
                                java.lang.Object msg)
                         throws java.lang.Exception
        Specified by:
        channelRead in interface
        channelRead in class