public class DirectByteBufferPool extends java.lang.Object implements BufferPool
A buffer pool which keeps a free list of direct buffers of a specified default size in a simple fixed size stack.
If the stack is full a buffer offered back is not kept but will be let for being freed by normal garbage collection.
| Constructor and Description |
|---|
DirectByteBufferPool(int defaultBufferSize,
int maxPoolEntries) |
| Modifier and Type | Method and Description |
|---|---|
java.nio.ByteBuffer |
acquire() |
void |
release(java.nio.ByteBuffer buf) |
public DirectByteBufferPool(int defaultBufferSize,
int maxPoolEntries)
public java.nio.ByteBuffer acquire()
acquire in interface BufferPoolpublic void release(java.nio.ByteBuffer buf)
release in interface BufferPool