|
||||||||||
| 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 ByteBufferPoolpublic void returnBuffer(java.nio.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 java.lang.Exception
start in interface Servicejava.lang.Exception
public void stop()
throws java.lang.Exception
stop in interface Servicejava.lang.Exceptionprotected java.nio.ByteBuffer createBuffer()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||