- All Superinterfaces:
org.apache.jena.atlas.lib.Closeable
- All Known Implementing Classes:
BufferAllocatorDirect,BufferAllocatorMapped,BufferAllocatorMem
public interface BufferAllocator
extends org.apache.jena.atlas.lib.Closeable
An allocator for retrieving ByteBuffers of a given size.
-
Method Summary
Methods inherited from interface org.apache.jena.atlas.lib.Closeable
close
-
Method Details
-
allocate
Allocate and return a ByteBuffer of the given size- Parameters:
capacity- the desired size of the ByteBuffer- Returns:
- a ByteBuffer with the capacity set to the desired size
-
clear
void clear()Call this method when you are finished with all of the ByteBuffers retrieved from allocate. The BufferAllocator is then free to reuse memory that was previously handed out.
-