|
||||||||||
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 | |
---|---|
java.nio.ByteBuffer |
borrowBuffer()
Extract a buffer from the pool. |
protected java.nio.ByteBuffer |
createBuffer()
|
boolean |
isUseDirect()
|
void |
returnBuffer(java.nio.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 java.nio.ByteBuffer borrowBuffer()
ByteBufferPool
borrowBuffer
in interface ByteBufferPool
public void returnBuffer(java.nio.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 java.lang.Exception
start
in interface Service
java.lang.Exception
public void stop() throws java.lang.Exception
stop
in interface Service
java.lang.Exception
protected java.nio.ByteBuffer createBuffer()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |