Package org.apache.parquet.bytes
Class HeapByteBufferAllocator
java.lang.Object
org.apache.parquet.bytes.HeapByteBufferAllocator
- All Implemented Interfaces:
ByteBufferAllocator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionallocate(int size) static final HeapByteBufferAllocatorbooleanisDirect()Indicates if this allocator will produce ByteBuffers backed by direct memory.voidFor RefCounted implementations using direct memory, the release method needs to be called to free references to the allocated memory.
-
Constructor Details
-
HeapByteBufferAllocator
public HeapByteBufferAllocator()
-
-
Method Details
-
getInstance
-
allocate
- Specified by:
allocatein interfaceByteBufferAllocator
-
release
Description copied from interface:ByteBufferAllocatorFor RefCounted implementations using direct memory, the release method needs to be called to free references to the allocated memory.- Specified by:
releasein interfaceByteBufferAllocator- Parameters:
b- a ByteBuffer
-
isDirect
public boolean isDirect()Description copied from interface:ByteBufferAllocatorIndicates if this allocator will produce ByteBuffers backed by direct memory.- Specified by:
isDirectin interfaceByteBufferAllocator- Returns:
- true if direct memory backed buffers will be created by this allocator, else false
-