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| 限定符和类型 | 字段和说明 |
|---|---|
static HsFileDataIndexImpl.HsFileDataIndexRegionHelper |
INSTANCE |
| 限定符和类型 | 方法和说明 |
|---|---|
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 在接口中 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 在接口中 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–2024 The Apache Software Foundation. All rights reserved.