Class SocketReceiveBufferAllocator
java.lang.Object
org.jboss.netty.channel.socket.nio.SocketReceiveBufferAllocator
- All Implemented Interfaces:
ExternalResourceReleasable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ByteBuffer
private int
private final int
private final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) ByteBuffer
get
(int size) private ByteBuffer
newBuffer
(int size) private static int
normalizeCapacity
(int capacity) void
Releases the external resources that this object depends on.
-
Field Details
-
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
-
newBuffer
-
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 interfaceExternalResourceReleasable
-