org.apache.activemq.transport.udp
Interface ByteBufferPool

All Superinterfaces:
Service
All Known Implementing Classes:
DefaultBufferPool, SimpleBufferPool

public interface ByteBufferPool
extends Service

Represents a pool of ByteBuffer instances. This strategy could just create new buffers for each call or it could pool them.


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 setDefaultSize(int defaultSize)
          Sets the default size of the buffers
 
Methods inherited from interface org.apache.activemq.Service
start, stop
 

Method Detail

borrowBuffer

java.nio.ByteBuffer borrowBuffer()
Extract a buffer from the pool.


returnBuffer

void returnBuffer(java.nio.ByteBuffer buffer)
Returns the buffer to the pool or just discards it for a non-pool strategy


setDefaultSize

void setDefaultSize(int defaultSize)
Sets the default size of the buffers



Copyright © 2005-2011 FuseSource, Corp.. All Rights Reserved.