Interface FileDataIndexRegionHelper<T extends FileDataIndexRegionHelper.Region>
public interface FileDataIndexRegionHelper<T extends FileDataIndexRegionHelper.Region>
FileDataIndexRegionHelper is responsible for writing a FileDataIndexRegionHelper.Region to the file or
reading a FileDataIndexRegionHelper.Region from file.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceAFileDataIndexRegionHelper.RegionRepresents a series of buffers that are: From the same subpartition Logically (i.e. buffer index) consecutive Physically (i.e. offset in the file) consecutive -
Method Summary
Modifier and TypeMethodDescriptionreadRegionFromFile(FileChannel channel, long fileOffset) Read a region from the file.voidwriteRegionToFile(FileChannel channel, T region) Write the region to the file.
-
Method Details
-
writeRegionToFile
Write the region to the file.- Parameters:
channel- the file channel to write the regionregion- the region to be written to the file- Throws:
IOException
-
readRegionFromFile
Read a region from the file.- Parameters:
channel- the file channel to read the regionfileOffset- the current region data is from this file offset, so start reading the file from the offset when reading the region- Returns:
- the region read from the file
- Throws:
IOException
-