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, setUseDirect
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setDefaultSize
public DefaultBufferPool()
public DefaultBufferPool(boolean useDirect)
public ByteBuffer borrowBuffer()
ByteBufferPool
borrowBuffer
in interface ByteBufferPool
borrowBuffer
in class SimpleBufferPool
public void returnBuffer(ByteBuffer buffer)
ByteBufferPool
returnBuffer
in interface ByteBufferPool
returnBuffer
in class SimpleBufferPool
public void start() throws Exception
start
in interface Service
start
in class SimpleBufferPool
Exception
Copyright © 2005–2016 FuseSource, Corp.. All rights reserved.