ByteBufferPoolWeakReferencedElasticByteBufferPool@Public @Stable public class ElasticByteBufferPool extends java.lang.Object implements ByteBufferPool
| Modifier and Type | Class | Description |
|---|---|---|
protected static class |
ElasticByteBufferPool.Key |
| Constructor | Description |
|---|---|
ElasticByteBufferPool() |
| Modifier and Type | Method | Description |
|---|---|---|
java.nio.ByteBuffer |
getBuffer(boolean direct,
int length) |
Get a new direct ByteBuffer.
|
void |
putBuffer(java.nio.ByteBuffer buffer) |
Release a buffer back to the pool.
|
int |
size(boolean direct) |
Get the size of the buffer pool, for the specified buffer type.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitreleasepublic java.nio.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(java.nio.ByteBuffer buffer)
ByteBufferPoolputBuffer in interface ByteBufferPoolbuffer - a direct bytebuffer@Private @Unstable public int size(boolean direct)
direct - Whether the size is returned for direct buffersCopyright © 2008–2025 Apache Software Foundation. All rights reserved.