@InterfaceAudience.Private private static class MultiRowRangeFilter.RangeIteration extends Object
Modifier and Type | Field and Description |
---|---|
private boolean |
exclusive |
private boolean |
foundFirstRange |
private boolean |
initialized |
private List<? extends MultiRowRangeFilter.BasicRowRange> |
ranges |
private boolean |
reversed |
private List<MultiRowRangeFilter.RowRange> |
sortedAndMergedRanges |
Constructor and Description |
---|
RangeIteration(List<MultiRowRangeFilter.RowRange> sortedAndMergedRanges) |
Modifier and Type | Method and Description |
---|---|
(package private) static List<MultiRowRangeFilter.ReversedRowRange> |
flipAndReverseRanges(List<MultiRowRangeFilter.RowRange> ranges)
Rebuilds the sorted ranges (by startKey) into an equivalent sorted list of ranges, only by
stopKey instead.
|
<T extends MultiRowRangeFilter.BasicRowRange> |
get(int i)
Gets the RowRange at the given offset.
|
int |
getNextRangeIndex(byte[] rowKey)
Calculates the position where the given rowkey fits in the ranges list.
|
boolean |
hasFoundFirstRange()
Returns true if the first matching row range was found.
|
(package private) void |
initialize(boolean reversed) |
boolean |
isExclusive()
Returns true if the current range's key is exclusive
|
boolean |
isInitialized()
Returns true if this class has been initialized by calling
initialize(boolean) . |
boolean |
isIterationComplete(int index)
Returns true if we exhausted searching all row ranges.
|
void |
resetExclusive()
Resets the exclusive flag.
|
void |
setFoundFirstRange()
Sets
foundFirstRange to true , indicating that we found a matching row range. |
private boolean exclusive
private boolean initialized
private boolean foundFirstRange
private boolean reversed
private final List<MultiRowRangeFilter.RowRange> sortedAndMergedRanges
private List<? extends MultiRowRangeFilter.BasicRowRange> ranges
public RangeIteration(List<MultiRowRangeFilter.RowRange> sortedAndMergedRanges)
void initialize(boolean reversed)
static List<MultiRowRangeFilter.ReversedRowRange> flipAndReverseRanges(List<MultiRowRangeFilter.RowRange> ranges)
public int getNextRangeIndex(byte[] rowKey)
rowKey
- the row key to calculatepublic void setFoundFirstRange()
foundFirstRange
to true
, indicating that we found a matching row range.public <T extends MultiRowRangeFilter.BasicRowRange> T get(int i)
public boolean hasFoundFirstRange()
public boolean isExclusive()
public void resetExclusive()
public boolean isInitialized()
initialize(boolean)
.public boolean isIterationComplete(int index)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.