Interface FileDataIndexRegionHelper<T extends FileDataIndexRegionHelper.Region>
-
public interface FileDataIndexRegionHelper<T extends FileDataIndexRegionHelper.Region>FileDataIndexRegionHelperis responsible for writing aFileDataIndexRegionHelper.Regionto the file or reading aFileDataIndexRegionHelper.Regionfrom file.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceFileDataIndexRegionHelper.RegionAFileDataIndexRegionHelper.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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TreadRegionFromFile(FileChannel channel, long fileOffset)Read a region from the file.voidwriteRegionToFile(FileChannel channel, T region)Write the region to the file.
-
-
-
Method Detail
-
writeRegionToFile
void writeRegionToFile(FileChannel channel, T region) throws IOException
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
T readRegionFromFile(FileChannel channel, long fileOffset) throws IOException
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
-
-