Package org.apache.parquet.bytes
Interface ByteBufferAllocator
-
- All Known Implementing Classes:
DirectByteBufferAllocator,HeapByteBufferAllocator
public interface ByteBufferAllocator
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ByteBufferallocate(int size)booleanisDirect()Indicates if this allocator will produce ByteBuffers backed by direct memory.voidrelease(ByteBuffer b)For RefCounted implementations using direct memory, the release method needs to be called to free references to the allocated memory.
-
-
-
Method Detail
-
allocate
ByteBuffer allocate(int size)
-
release
void release(ByteBuffer b)
For RefCounted implementations using direct memory, the release method needs to be called to free references to the allocated memory.- Parameters:
b- a ByteBuffer
-
isDirect
boolean isDirect()
Indicates if this allocator will produce ByteBuffers backed by direct memory.- Returns:
- true if direct memory backed buffers will be created by this allocator, else false
-
-