Class SocketReceiveBufferAllocator
- java.lang.Object
-
- org.jboss.netty.channel.socket.nio.SocketReceiveBufferAllocator
-
- All Implemented Interfaces:
ExternalResourceReleasable
final class SocketReceiveBufferAllocator extends java.lang.Object implements ExternalResourceReleasable
-
-
Field Summary
Fields Modifier and Type Field Description private java.nio.ByteBuffer
buf
private int
exceedCount
private int
maxExceedCount
private int
percentual
-
Constructor Summary
Constructors Constructor Description SocketReceiveBufferAllocator()
SocketReceiveBufferAllocator(int maxExceedCount, int percentual)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) java.nio.ByteBuffer
get(int size)
private java.nio.ByteBuffer
newBuffer(int size)
private static int
normalizeCapacity(int capacity)
void
releaseExternalResources()
Releases the external resources that this object depends on.
-
-
-
Method Detail
-
get
java.nio.ByteBuffer get(int size)
-
newBuffer
private java.nio.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 interfaceExternalResourceReleasable
-
-