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 |
|---|---|
java.nio.ByteBuffer |
borrowBuffer()
Extract a buffer from the pool.
|
void |
returnBuffer(java.nio.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 java.nio.ByteBuffer borrowBuffer()
ByteBufferPoolborrowBuffer in interface ByteBufferPoolborrowBuffer in class SimpleBufferPoolpublic void returnBuffer(java.nio.ByteBuffer buffer)
ByteBufferPoolreturnBuffer in interface ByteBufferPoolreturnBuffer in class SimpleBufferPoolpublic void start()
throws java.lang.Exception
start in interface Servicestart in class SimpleBufferPooljava.lang.Exceptionpublic void stop()
throws java.lang.Exception
stop in interface Servicestop in class SimpleBufferPooljava.lang.ExceptionCopyright © 2005-2013 Red Hat, Inc.. All Rights Reserved.