protected static class ExternalizableHelper.Stats extends Object implements MultiBufferWriteBuffer.WriteBufferPool
| Modifier | Constructor and Description |
|---|---|
protected |
Stats() |
| Modifier and Type | Method and Description |
|---|---|
WriteBuffer |
allocate(int cbPreviousTotal)
Allocate a WriteBuffer for use by the MultiBufferWriteBuffer.
|
int |
getMaximumCapacity()
Determine the largest amount of aggregate WriteBuffer capacity
that this factory can provide.
|
void |
release(WriteBuffer buffer)
Returns a WriteBuffer to the pool.
|
public int getMaximumCapacity()
getMaximumCapacity in interface MultiBufferWriteBuffer.WriteBufferPoolpublic WriteBuffer allocate(int cbPreviousTotal)
Note that the returned WriteBuffer is expected to be empty, and its capacity is expected to be identical to its maximum capacity, i.e. it is not expected to resize itself, since the purpose of the MultiBufferWriteBuffer is to act as a dynamically-sized WriteBuffer.
allocate in interface MultiBufferWriteBuffer.WriteBufferPoolcbPreviousTotal - the total number of bytes of capacity of
the WriteBuffer objects that the MultiBufferWriteBuffer has
thus far consumedpublic void release(WriteBuffer buffer)
release in interface MultiBufferWriteBuffer.WriteBufferPoolbuffer - the WriteBuffer that is no longer being used