|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.activemq.journal.impl.ByteBufferPool
Provides a simple pool of ByteBuffer objects.
Constructor Summary | |
ByteBufferPool()
Creates a pool of 4 x 4 Meg ByteBuffers |
|
ByteBufferPool(int bufferCount,
int bufferSize)
Creates a pool of bufferCount ByteBuffers that are
directly allocated being bufferSize big. |
Method Summary | |
ByteBuffer |
getByteBuffer()
Blocks until a ByteBuffer can be retreived from the pool. |
void |
returnByteBuffer(ByteBuffer buffer)
Returns a ByteBuffer to the pool. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ByteBufferPool()
public ByteBufferPool(int bufferCount, int bufferSize)
bufferCount
ByteBuffers that are
directly allocated being bufferSize
big.
bufferCount
- the number of buffers that will be in the pool.bufferSize
- the size of the buffers that are in the pool.Method Detail |
public ByteBuffer getByteBuffer() throws InterruptedException
InterruptedException
public void returnByteBuffer(ByteBuffer buffer)
buffer
-
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |