org.apache.activemq.transport.udp
Class DefaultBufferPool
java.lang.Object
org.apache.activemq.transport.udp.SimpleBufferPool
org.apache.activemq.transport.udp.DefaultBufferPool
- All Implemented Interfaces:
- Service, ByteBufferPool
public class DefaultBufferPool
- extends SimpleBufferPool
- implements ByteBufferPool
A default implementation of BufferPool
which keeps a pool of direct
byte buffers.
- Version:
- $Revision: 426366 $
Method Summary |
java.nio.ByteBuffer |
borrowBuffer()
Extract a buffer from the pool. |
void |
returnBuffer(java.nio.ByteBuffer buffer)
Returns the buffer to the pool or just discards it for a non-pool strategy |
void |
start()
|
void |
stop()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultBufferPool
public DefaultBufferPool()
DefaultBufferPool
public DefaultBufferPool(boolean useDirect)
borrowBuffer
public java.nio.ByteBuffer borrowBuffer()
- Description copied from interface:
ByteBufferPool
- Extract a buffer from the pool.
- Specified by:
borrowBuffer
in interface ByteBufferPool
- Overrides:
borrowBuffer
in class SimpleBufferPool
returnBuffer
public void returnBuffer(java.nio.ByteBuffer buffer)
- Description copied from interface:
ByteBufferPool
- Returns the buffer to the pool or just discards it for a non-pool strategy
- Specified by:
returnBuffer
in interface ByteBufferPool
- Overrides:
returnBuffer
in class SimpleBufferPool
start
public void start()
throws java.lang.Exception
- Specified by:
start
in interface Service
- Overrides:
start
in class SimpleBufferPool
- Throws:
java.lang.Exception
stop
public void stop()
throws java.lang.Exception
- Specified by:
stop
in interface Service
- Overrides:
stop
in class SimpleBufferPool
- Throws:
java.lang.Exception
Copyright © 2011 Apache Software Foundation. All Rights Reserved.