Class SocketSendBufferPool
- java.lang.Object
-
- org.jboss.netty.channel.socket.nio.SocketSendBufferPool
-
- All Implemented Interfaces:
ExternalResourceReleasable
final class SocketSendBufferPool extends java.lang.Object implements ExternalResourceReleasable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classSocketSendBufferPool.EmptySendBuffer(package private) classSocketSendBufferPool.FileSendBuffer(package private) static classSocketSendBufferPool.GatheringSendBuffer(package private) classSocketSendBufferPool.PooledSendBufferprivate static classSocketSendBufferPool.Preallocationprivate classSocketSendBufferPool.PreallocationRef(package private) static interfaceSocketSendBufferPool.SendBuffer(package private) static classSocketSendBufferPool.UnpooledSendBuffer
-
Field Summary
Fields Modifier and Type Field Description private static intALIGN_MASKprivate static intALIGN_SHIFTprivate SocketSendBufferPool.Preallocationcurrentprivate static intDEFAULT_PREALLOCATION_SIZEprivate static SocketSendBufferPool.SendBufferEMPTY_BUFFERprivate SocketSendBufferPool.PreallocationRefpoolHead
-
Constructor Summary
Constructors Constructor Description SocketSendBufferPool()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) SocketSendBufferPool.SendBufferacquire(java.lang.Object message)private SocketSendBufferPool.SendBufferacquire(ChannelBuffer src)private SocketSendBufferPool.SendBufferacquire(FileRegion src)private static intalign(int pos)private SocketSendBufferPool.PreallocationgetPreallocation()private SocketSendBufferPool.PreallocationgetPreallocation0()voidreleaseExternalResources()Releases the external resources that this object depends on.
-
-
-
Field Detail
-
EMPTY_BUFFER
private static final SocketSendBufferPool.SendBuffer EMPTY_BUFFER
-
DEFAULT_PREALLOCATION_SIZE
private static final int DEFAULT_PREALLOCATION_SIZE
- See Also:
- Constant Field Values
-
ALIGN_SHIFT
private static final int ALIGN_SHIFT
- See Also:
- Constant Field Values
-
ALIGN_MASK
private static final int ALIGN_MASK
- See Also:
- Constant Field Values
-
poolHead
private SocketSendBufferPool.PreallocationRef poolHead
-
current
private SocketSendBufferPool.Preallocation current
-
-
Method Detail
-
acquire
SocketSendBufferPool.SendBuffer acquire(java.lang.Object message)
-
acquire
private SocketSendBufferPool.SendBuffer acquire(FileRegion src)
-
acquire
private SocketSendBufferPool.SendBuffer acquire(ChannelBuffer src)
-
getPreallocation
private SocketSendBufferPool.Preallocation getPreallocation()
-
getPreallocation0
private SocketSendBufferPool.Preallocation getPreallocation0()
-
align
private static int align(int pos)
-
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
-
-