public static final class RecordReaderUtils.ByteBufferAllocatorPool extends Object implements HadoopShims.ByteBufferPoolShim
| Constructor and Description |
|---|
ByteBufferAllocatorPool() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
ByteBuffer |
getBuffer(boolean direct,
int length)
Get a new ByteBuffer from the pool.
|
void |
putBuffer(ByteBuffer buffer)
Release a buffer back to the pool.
|
public void clear()
public ByteBuffer getBuffer(boolean direct, int length)
HadoopShims.ByteBufferPoolShimgetBuffer in interface HadoopShims.ByteBufferPoolShimdirect - Whether the buffer should be direct.length - The minimum length the buffer will have.public void putBuffer(ByteBuffer buffer)
HadoopShims.ByteBufferPoolShimputBuffer in interface HadoopShims.ByteBufferPoolShimbuffer - a direct bytebufferCopyright © 2013–2018 The Apache Software Foundation. All rights reserved.