public static class ProducerMergedPartitionFileIndex.FixedSizeRegion extends Object implements FileDataIndexRegionHelper.Region
Note that the region has a fixed size.
Modifier and Type | Field and Description |
---|---|
static int |
REGION_SIZE |
Constructor and Description |
---|
FixedSizeRegion(int firstBufferIndex,
long regionStartOffset,
long regionEndOffset,
int numBuffers) |
Modifier and Type | Method and Description |
---|---|
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.
|
int |
getSize()
Get the total size in bytes of this region, including the fields and the buffers.
|
public static final int REGION_SIZE
public FixedSizeRegion(int firstBufferIndex, long regionStartOffset, long regionEndOffset, int numBuffers)
public boolean containBuffer(int bufferIndex)
FileDataIndexRegionHelper.Region
containBuffer
in interface FileDataIndexRegionHelper.Region
bufferIndex
- the specific buffer indexpublic int getSize()
getSize
in interface FileDataIndexRegionHelper.Region
public long getRegionStartOffset()
FileDataIndexRegionHelper.Region
getRegionStartOffset
in interface FileDataIndexRegionHelper.Region
public long getRegionEndOffset()
FileDataIndexRegionHelper.Region
getRegionEndOffset
in interface FileDataIndexRegionHelper.Region
public int getNumBuffers()
FileDataIndexRegionHelper.Region
getNumBuffers
in interface FileDataIndexRegionHelper.Region
public int getFirstBufferIndex()
FileDataIndexRegionHelper.Region
getFirstBufferIndex
in interface FileDataIndexRegionHelper.Region
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.