|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.activemq.transport.udp.SimpleBufferPool
public class SimpleBufferPool
A simple implementation of BufferPool
which does no pooling and just
creates new buffers each time
Constructor Summary | |
---|---|
SimpleBufferPool()
|
|
SimpleBufferPool(boolean useDirect)
|
Method Summary | |
---|---|
ByteBuffer |
borrowBuffer()
Extract a buffer from the pool. |
protected ByteBuffer |
createBuffer()
|
boolean |
isUseDirect()
|
void |
returnBuffer(ByteBuffer buffer)
Returns the buffer to the pool or just discards it for a non-pool strategy |
void |
setDefaultSize(int defaultSize)
Sets the default size of the buffers |
void |
setUseDirect(boolean useDirect)
Sets whether direct buffers are used or not |
void |
start()
|
void |
stop()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SimpleBufferPool()
public SimpleBufferPool(boolean useDirect)
Method Detail |
---|
public ByteBuffer borrowBuffer()
ByteBufferPool
borrowBuffer
in interface ByteBufferPool
public void returnBuffer(ByteBuffer buffer)
ByteBufferPool
returnBuffer
in interface ByteBufferPool
public void setDefaultSize(int defaultSize)
ByteBufferPool
setDefaultSize
in interface ByteBufferPool
public boolean isUseDirect()
public void setUseDirect(boolean useDirect)
public void start() throws Exception
start
in interface Service
Exception
public void stop() throws Exception
stop
in interface Service
Exception
protected ByteBuffer createBuffer()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |