Class SocketReceiveBufferAllocator
java.lang.Object
org.jboss.netty.channel.socket.nio.SocketReceiveBufferAllocator
- All Implemented Interfaces:
ExternalResourceReleasable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ByteBufferprivate intprivate final intprivate final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) ByteBufferget(int size) private ByteBuffernewBuffer(int size) private static intnormalizeCapacity(int capacity) voidReleases 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:ExternalResourceReleasableReleases 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:
releaseExternalResourcesin interfaceExternalResourceReleasable
-