Class SocketReceiveBufferAllocator

java.lang.Object
org.jboss.netty.channel.socket.nio.SocketReceiveBufferAllocator
All Implemented Interfaces:
ExternalResourceReleasable

final class SocketReceiveBufferAllocator extends Object implements ExternalResourceReleasable
  • Field Details

    • buf

      private ByteBuffer buf
    • exceedCount

      private int exceedCount
    • maxExceedCount

      private final int maxExceedCount
    • percentual

      private final int percentual
  • Constructor Details

    • SocketReceiveBufferAllocator

      SocketReceiveBufferAllocator()
    • SocketReceiveBufferAllocator

      SocketReceiveBufferAllocator(int maxExceedCount, int percentual)
  • Method Details

    • get

      ByteBuffer get(int size)
    • newBuffer

      private ByteBuffer newBuffer(int size)
    • normalizeCapacity

      private static int normalizeCapacity(int capacity)
    • releaseExternalResources

      public void releaseExternalResources()
      Description copied from interface: ExternalResourceReleasable
      Releases the external resources that this object depends on. You should not call this method if the external resources (e.g. thread pool) are in use by other objects.
      Specified by:
      releaseExternalResources in interface ExternalResourceReleasable