org.jppf.utils.pooling
Class DirectBufferPool
java.lang.Object
org.jppf.utils.pooling.DirectBufferPool
public class DirectBufferPool
- extends Object
Static factory for a pool of direct byte buffers.
- Author:
- Laurent Cohen
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DirectBufferPool
public DirectBufferPool()
provideBuffer
public static ByteBuffer provideBuffer()
- Get a buffer from the pool, or a new buffer if the pool is empty.
- Returns:
- a
ByteBuffer instance.
releaseBuffer
public static void releaseBuffer(ByteBuffer buffer)
- Release abuffer into the pool and make it available.
- Parameters:
buffer - the buffer to release.
Copyright © 2005-2010 JPPF Team.