public class DirectByteBufferPool extends Object implements ByteBufferPool
ByteBuffers of a specified default size in a simple fixed size stack. If the stack is full, the buffer is de-referenced and available to be freed by normal garbage collection (whenever that may actually take place)
|Constructor and Description|
|Modifier and Type||Method and Description|
Borrow a buffer from the pool.
Returns a buffer to the pool.
public DirectByteBufferPool(int minBufferSize, int maxPoolSize)
minBufferSize- the minimum size to create buffers.
maxPoolSize- the maximum buffers to keep in the pool.
public ByteBuffer acquire(int size)
Copyright © 2004–2021. All rights reserved.