@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)
ByteBufferPoolgetBuffer in interface ByteBufferPooldirect - Whether the buffer should be direct.length - The minimum length the buffer will have.public void putBuffer(ByteBuffer buffer)
ByteBufferPoolputBuffer in interface ByteBufferPoolbuffer - a direct bytebufferCopyright © 2008–2022 Apache Software Foundation. All rights reserved.