public class BufferPoolStriped extends BufferPoolImpl
| Constructor and Description |
|---|
BufferPoolStriped(int inNumStripes,
int inChunkSize,
int inNumChunks) |
| Modifier and Type | Method and Description |
|---|---|
java.nio.ByteBuffer |
allocBuffer(int minSize)
Returns an empty buffer with at least minSize capacity.
|
java.nio.ByteBuffer |
allocBufferChunk()
Returns an empty buffer with chunkSize capacity.
|
int |
getChunkSize() |
int |
getNumChunks() |
void |
printAllocated()
Print a list of buffers currently allocated.
|
void |
returnBuffer(java.nio.ByteBuffer inBuffer)
Return a buffer to the buffer pool.
|
public BufferPoolStriped(int inNumStripes,
int inChunkSize,
int inNumChunks)
public int getChunkSize()
getChunkSize in interface BufferPoolgetChunkSize in class BufferPoolImplpublic int getNumChunks()
getNumChunks in interface BufferPoolgetNumChunks in class BufferPoolImplpublic java.nio.ByteBuffer allocBuffer(int minSize)
BufferPoolallocBuffer in interface BufferPoolallocBuffer in class BufferPoolImplminSize - - The minimum size of the returned buffer.public java.nio.ByteBuffer allocBufferChunk()
BufferPoolallocBufferChunk in interface BufferPoolallocBufferChunk in class BufferPoolImplpublic void returnBuffer(java.nio.ByteBuffer inBuffer)
BufferPoolreturnBuffer in interface BufferPoolreturnBuffer in class BufferPoolImplinBuffer - - The buffer to return to the pool.public void printAllocated()
BufferPoolImplprintAllocated in interface BufferPoolprintAllocated in class BufferPoolImpl