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.
  • Method Details

    • writeRegionToFile

      void writeRegionToFile(FileChannel channel, T region) throws IOException
      Write the region to the file.
      Parameters:
      channel - the file channel to write the region
      region - 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 region
      fileOffset - 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