@InterfaceAudience.Public @InterfaceStability.Stable public interface ByteBufferPool
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.
|
ByteBuffer getBuffer(boolean direct, int length)
direct
- Whether the buffer should be direct.length
- The minimum length the buffer will have.void putBuffer(ByteBuffer buffer)
buffer
- a direct bytebufferCopyright © 2015 Apache Software Foundation. All Rights Reserved.