| org.apache.mina.common.IoBufferAllocator
All known Subclasses: org.apache.mina.common.SimpleBufferAllocator, org.apache.mina.common.CachedBufferAllocator,
IoBufferAllocator | public interface IoBufferAllocator (Code) | | Allocates
IoBuffer s and manages them. Please implement this
interface if you need more advanced memory management scheme.
author: The Apache MINA Project (dev@mina.apache.org) version: $Rev: 593795 $, $Date: 2007-11-10 10:21:20 -0700 (Sat, 10 Nov 2007) $ |
Method Summary | |
IoBuffer | allocate(int capacity, boolean direct) Returns the buffer which is capable of the specified size. | ByteBuffer | allocateNioBuffer(int capacity, boolean direct) Returns the NIO buffer which is capable of the specified size. | void | dispose() Dispose of this allocator. | IoBuffer | wrap(ByteBuffer nioBuffer) Wraps the specified NIO
ByteBuffer into MINA buffer. |
allocate | IoBuffer allocate(int capacity, boolean direct)(Code) | | Returns the buffer which is capable of the specified size.
Parameters: capacity - the capacity of the buffer Parameters: direct - true to get a direct buffer,false to get a heap buffer. |
allocateNioBuffer | ByteBuffer allocateNioBuffer(int capacity, boolean direct)(Code) | | Returns the NIO buffer which is capable of the specified size.
Parameters: capacity - the capacity of the buffer Parameters: direct - true to get a direct buffer,false to get a heap buffer. |
dispose | void dispose()(Code) | | Dispose of this allocator.
|
wrap | IoBuffer wrap(ByteBuffer nioBuffer)(Code) | | Wraps the specified NIO
ByteBuffer into MINA buffer.
|
|
|