com.kenai.jaffl.util
public class SimpleBufferPool extends Object implements BufferPool
Constructor Summary | |
---|---|
SimpleBufferPool(int bufferSize, int poolSize)
Creates a new instance of SimpleBufferPool | |
SimpleBufferPool(BufferPool parent, int bufferSize, int poolSize) Creates a new instance of SimpleBufferPool |
Method Summary | |
---|---|
ByteBuffer | get(int size) |
void | put(ByteBuffer buf) |
void | putAll(List<ByteBuffer> list) |
Parameters: bufferSize The Size of ByteBuffer this pool should return poolSize The maximum number of ByteBuffers to cache
Parameters: parent The parent pool from which to to fetch/return extra buffers. bufferSize The Size of ByteBuffer this pool should return. poolSize The maximum number of ByteBuffers to cache.