Class DefaultBufferPool
java.lang.Object
org.apache.activemq.transport.udp.SimpleBufferPool
org.apache.activemq.transport.udp.DefaultBufferPool
- All Implemented Interfaces:
Service,ByteBufferPool
A default implementation of
SimpleBufferPool which keeps a pool of direct
byte buffers.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionExtract a buffer from the pool.voidreturnBuffer(ByteBuffer buffer) Returns the buffer to the pool or just discards it for a non-pool strategyvoidstart()voidstop()Methods inherited from class org.apache.activemq.transport.udp.SimpleBufferPool
createBuffer, isUseDirect, setDefaultSize, setUseDirectMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.activemq.transport.udp.ByteBufferPool
setDefaultSize
-
Constructor Details
-
DefaultBufferPool
public DefaultBufferPool() -
DefaultBufferPool
public DefaultBufferPool(boolean useDirect)
-
-
Method Details
-
borrowBuffer
Description copied from interface:ByteBufferPoolExtract a buffer from the pool.- Specified by:
borrowBufferin interfaceByteBufferPool- Overrides:
borrowBufferin classSimpleBufferPool
-
returnBuffer
Description copied from interface:ByteBufferPoolReturns the buffer to the pool or just discards it for a non-pool strategy- Specified by:
returnBufferin interfaceByteBufferPool- Overrides:
returnBufferin classSimpleBufferPool
-
start
- Specified by:
startin interfaceService- Overrides:
startin classSimpleBufferPool- Throws:
Exception
-
stop
- Specified by:
stopin interfaceService- Overrides:
stopin classSimpleBufferPool- Throws:
Exception
-