java.lang.Object
org.apache.jena.tdb1.base.file.BufferAllocatorMapped
- All Implemented Interfaces:
org.apache.jena.atlas.lib.Closeable,BufferAllocator
ByteBuffer access to a temporary file, using memory mapped I/O. The file will
grow in chunks as necessary by the SystemTDB.SegmentSize.
This class is not thread-safe.
-
Constructor Details
-
BufferAllocatorMapped
public BufferAllocatorMapped(int blockSize)
-
-
Method Details
-
allocate
Description copied from interface:BufferAllocatorAllocate and return a ByteBuffer of the given size- Specified by:
allocatein interfaceBufferAllocator- Parameters:
blkSize- the desired size of the ByteBuffer- Returns:
- a ByteBuffer with the capacity set to the desired size
-
clear
public void clear()Description copied from interface:BufferAllocatorCall 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.- Specified by:
clearin interfaceBufferAllocator
-
close
public void close()- Specified by:
closein interfaceorg.apache.jena.atlas.lib.Closeable
-