public static final class RecordReaderUtils.ByteBufferAllocatorPool extends Object implements HadoopShims.ByteBufferPoolShim
Constructor and Description |
---|
RecordReaderUtils.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 RecordReaderUtils.ByteBufferAllocatorPool()
public void clear()
public ByteBuffer getBuffer(boolean direct, int length)
HadoopShims.ByteBufferPoolShim
getBuffer
in interface HadoopShims.ByteBufferPoolShim
direct
- Whether the buffer should be direct.length
- The minimum length the buffer will have.public void putBuffer(ByteBuffer buffer)
HadoopShims.ByteBufferPoolShim
putBuffer
in interface HadoopShims.ByteBufferPoolShim
buffer
- a direct bytebufferCopyright © 2017 The Apache Software Foundation. All rights reserved.