public static class HsFileDataIndexImpl.HsFileDataIndexRegionHelper extends Object implements FileDataIndexRegionHelper<HsFileDataIndexImpl.InternalRegion>
FileDataIndexRegionHelper to writing a region to the file or
reading a region from the file.
Note that this type of region's length may be variable because it contains an array to indicate each buffer's release state.
FileDataIndexRegionHelper.Region| Modifier and Type | Field and Description |
|---|---|
static HsFileDataIndexImpl.HsFileDataIndexRegionHelper |
INSTANCE |
| Modifier and Type | Method and Description |
|---|---|
HsFileDataIndexImpl.InternalRegion |
readRegionFromFile(FileChannel channel,
long fileOffset)
Read a region from the file.
|
void |
writeRegionToFile(FileChannel channel,
HsFileDataIndexImpl.InternalRegion region)
Write the region to the file.
|
public static final HsFileDataIndexImpl.HsFileDataIndexRegionHelper INSTANCE
public void writeRegionToFile(FileChannel channel, HsFileDataIndexImpl.InternalRegion region) throws IOException
FileDataIndexRegionHelperwriteRegionToFile in interface FileDataIndexRegionHelper<HsFileDataIndexImpl.InternalRegion>channel - the file channel to write the regionregion - the region to be written to the fileIOExceptionpublic HsFileDataIndexImpl.InternalRegion readRegionFromFile(FileChannel channel, long fileOffset) throws IOException
FileDataIndexRegionHelperreadRegionFromFile in interface FileDataIndexRegionHelper<HsFileDataIndexImpl.InternalRegion>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 regionIOExceptionCopyright © 2014–2025 The Apache Software Foundation. All rights reserved.