public static class ByteArrayWriteBuffer.Allocator extends Object implements MultiBufferWriteBuffer.WriteBufferPool
| Modifier and Type | Field and Description |
|---|---|
protected int |
m_cb
The capacity of the ByteArrayWriteBuffer instances to allocate.
|
| Constructor and Description |
|---|
Allocator(int cb)
Construct an Allocator for ByteArrayWriteBuffers of a given size.
|
| Modifier and Type | Method and Description |
|---|---|
WriteBuffer |
allocate(int cbPreviousTotal)
Allocate a new ByteArrayWriteBuffer.
|
int |
getMaximumCapacity()
Determine the largest amount of aggregate WriteBuffer capacity that this factory can provide.
|
void |
release(WriteBuffer buffer)
Release the supplied buffer into the pool.
|
protected int m_cb
public Allocator(int cb)
cb - the capacity of the ByteArrayWriteBuffer to be allocatedpublic int getMaximumCapacity()
getMaximumCapacity in interface MultiBufferWriteBuffer.WriteBufferPoolpublic WriteBuffer allocate(int cbPreviousTotal)
allocate in interface MultiBufferWriteBuffer.WriteBufferPoolcbPreviousTotal - unusedcapacitypublic void release(WriteBuffer buffer)
This method is a no op.
release in interface MultiBufferWriteBuffer.WriteBufferPoolbuffer - unused