public static class HsFileDataIndexImpl.InternalRegion extends Object implements FileDataIndexRegionHelper.Region
HsFileDataIndexImpl.InternalRegion is an implementation of FileDataIndexRegionHelper.Region.
Note that this class introduced a new field to indicate whether each buffer in the region is
released.| 限定符和类型 | 字段和说明 |
|---|---|
static int |
HEADER_SIZE
HsFileDataIndexImpl.InternalRegion is consists of header and payload. |
| 构造器和说明 |
|---|
InternalRegion(int firstBufferIndex,
long regionFileOffset,
int numBuffers,
boolean[] released) |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
containBuffer(int bufferIndex)
Whether the current region contain the buffer.
|
int |
getFirstBufferIndex()
Get the first buffer index of this region.
|
int |
getNumBuffers()
Get the number of buffers in this region.
|
long |
getRegionEndOffset()
Get the file end offset of the region.
|
long |
getRegionStartOffset()
Get the file start offset of this region.
|
boolean[] |
getReleased() |
int |
getSize()
Get the total size in bytes of this region, including the fields and the buffers.
|
public static final int HEADER_SIZE
HsFileDataIndexImpl.InternalRegion is consists of header and payload. (firstBufferIndex,
firstBufferOffset, numBuffer) are immutable header part that have fixed size. The array
of released is variable payload. This field represents the size of header.public InternalRegion(int firstBufferIndex,
long regionFileOffset,
int numBuffers,
boolean[] released)
public boolean containBuffer(int bufferIndex)
FileDataIndexRegionHelper.RegioncontainBuffer 在接口中 FileDataIndexRegionHelper.RegionbufferIndex - the specific buffer indexpublic int getSize()
FileDataIndexRegionHelper.RegiongetSize 在接口中 FileDataIndexRegionHelper.Regionpublic int getFirstBufferIndex()
FileDataIndexRegionHelper.Regionpublic long getRegionStartOffset()
FileDataIndexRegionHelper.Regionpublic long getRegionEndOffset()
FileDataIndexRegionHelper.Regionpublic int getNumBuffers()
FileDataIndexRegionHelper.Regionpublic boolean[] getReleased()
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.