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 class
SocketSendBufferPool.EmptySendBuffer
(package private) class
SocketSendBufferPool.FileSendBuffer
(package private) static class
SocketSendBufferPool.GatheringSendBuffer
(package private) class
SocketSendBufferPool.PooledSendBuffer
private static class
SocketSendBufferPool.Preallocation
private class
SocketSendBufferPool.PreallocationRef
(package private) static interface
SocketSendBufferPool.SendBuffer
(package private) static class
SocketSendBufferPool.UnpooledSendBuffer
-
Field Summary
Fields Modifier and Type Field Description private static int
ALIGN_MASK
private static int
ALIGN_SHIFT
private SocketSendBufferPool.Preallocation
current
private static int
DEFAULT_PREALLOCATION_SIZE
private static SocketSendBufferPool.SendBuffer
EMPTY_BUFFER
private SocketSendBufferPool.PreallocationRef
poolHead
-
Constructor Summary
Constructors Constructor Description SocketSendBufferPool()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) SocketSendBufferPool.SendBuffer
acquire(java.lang.Object message)
private SocketSendBufferPool.SendBuffer
acquire(ChannelBuffer src)
private SocketSendBufferPool.SendBuffer
acquire(FileRegion src)
private static int
align(int pos)
private SocketSendBufferPool.Preallocation
getPreallocation()
private SocketSendBufferPool.Preallocation
getPreallocation0()
void
releaseExternalResources()
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: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
-
-