akka.io
Class DirectByteBufferPool
java.lang.Object
akka.io.DirectByteBufferPool
- All Implemented Interfaces:
- BufferPool
public class DirectByteBufferPool
- extends java.lang.Object
- implements BufferPool
INTERNAL API
A buffer pool which keeps a free list of direct buffers of a specified default
size in a simple fixed size stack.
If the stack is full a buffer offered back is not kept but will be let for
being freed by normal garbage collection.
Method Summary |
java.nio.ByteBuffer |
acquire()
|
void |
release(java.nio.ByteBuffer buf)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DirectByteBufferPool
public DirectByteBufferPool(int defaultBufferSize,
int maxPoolEntries)
acquire
public java.nio.ByteBuffer acquire()
- Specified by:
acquire
in interface BufferPool
release
public void release(java.nio.ByteBuffer buf)
- Specified by:
release
in interface BufferPool