@InterfaceAudience.Public @InterfaceStability.Stable public final class ElasticByteBufferPool extends Object implements ByteBufferPool
Constructor and Description |
---|
ElasticByteBufferPool() |
Modifier and Type | Method and Description |
---|---|
ByteBuffer |
getBuffer(boolean direct,
int length)
Get a new direct ByteBuffer.
|
void |
putBuffer(ByteBuffer buffer)
Release a buffer back to the pool.
|
public ByteBuffer getBuffer(boolean direct, int length)
ByteBufferPool
getBuffer
in interface ByteBufferPool
direct
- Whether the buffer should be direct.length
- The minimum length the buffer will have.public void putBuffer(ByteBuffer buffer)
ByteBufferPool
putBuffer
in interface ByteBufferPool
buffer
- a direct bytebufferCopyright © 2018 Apache Software Foundation. All rights reserved.