Class TElasticFramedTransport.Factory

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected int thriftDefaultBufferSize
      The capacity of the underlying buffer is allowed to exceed thriftDefaultBufferSize, but if adjacent requests all have sizes smaller than thriftDefaultBufferSize, the underlying buffer will be shrunk beneath thriftDefaultBufferSize.
      protected int thriftMaxFrameSize
      It is used to prevent the size of the parsing package from being too large and allocating the buffer will cause oom.
    • Constructor Summary

      Constructors 
      Constructor Description
      Factory()  
      Factory​(int thriftDefaultBufferSize, int thriftMaxFrameSize)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.apache.thrift.transport.TTransport getTransport​(org.apache.thrift.transport.TTransport trans)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • thriftMaxFrameSize

        protected final int thriftMaxFrameSize
        It is used to prevent the size of the parsing package from being too large and allocating the buffer will cause oom. Therefore, the maximum length of the requested memory is limited when reading.
      • thriftDefaultBufferSize

        protected final int thriftDefaultBufferSize
        The capacity of the underlying buffer is allowed to exceed thriftDefaultBufferSize, but if adjacent requests all have sizes smaller than thriftDefaultBufferSize, the underlying buffer will be shrunk beneath thriftDefaultBufferSize. The shrinking is limited at most once per minute to reduce overhead when thriftDefaultBufferSize is set unreasonably or the workload naturally contains both ver large and very small requests.
    • Constructor Detail

      • Factory

        public Factory()
      • Factory

        public Factory​(int thriftDefaultBufferSize,
                       int thriftMaxFrameSize)
    • Method Detail

      • getTransport

        public org.apache.thrift.transport.TTransport getTransport​(org.apache.thrift.transport.TTransport trans)
        Overrides:
        getTransport in class org.apache.thrift.transport.TTransportFactory