public class DefaultBufferPool extends SimpleBufferPool implements ByteBufferPool
BufferPool which keeps a pool of direct
byte buffers.| Constructor and Description |
|---|
DefaultBufferPool() |
DefaultBufferPool(boolean useDirect) |
| Modifier and Type | Method and Description |
|---|---|
ByteBuffer |
borrowBuffer()
Extract a buffer from the pool.
|
void |
returnBuffer(ByteBuffer buffer)
Returns the buffer to the pool or just discards it for a non-pool strategy
|
void |
start() |
void |
stop() |
createBuffer, isUseDirect, setDefaultSize, setUseDirectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsetDefaultSizepublic DefaultBufferPool()
public DefaultBufferPool(boolean useDirect)
public ByteBuffer borrowBuffer()
ByteBufferPoolborrowBuffer in interface ByteBufferPoolborrowBuffer in class SimpleBufferPoolpublic void returnBuffer(ByteBuffer buffer)
ByteBufferPoolreturnBuffer in interface ByteBufferPoolreturnBuffer in class SimpleBufferPoolpublic void start() throws Exception
start in interface Servicestart in class SimpleBufferPoolExceptionCopyright © 2005–2016 FuseSource, Corp.. All rights reserved.