|
||||||||||
| 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 ByteBufferPoolpublic void returnBuffer(ByteBuffer buffer)
ByteBufferPool
returnBuffer in interface ByteBufferPoolpublic void setDefaultSize(int defaultSize)
ByteBufferPool
setDefaultSize in interface ByteBufferPoolpublic boolean isUseDirect()
public void setUseDirect(boolean useDirect)
public void start()
throws Exception
start in interface ServiceException
public void stop()
throws Exception
stop in interface ServiceExceptionprotected ByteBuffer createBuffer()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||