/** * calculate the position where the row key in the ranges list. * * @param rowKey the row key to calculate * @return index the position of the row key */ private int getNextRangeIndex(byte[] rowKey) { RowRange temp = new RowRange(rowKey, true, null, true); int index = Collections.binarySearch(rangeList, temp); if (index < 0) { int insertionPosition = -index - 1; // check if the row key in the range before the insertion position if (insertionPosition != 0 && rangeList.get(insertionPosition - 1).contains(rowKey)) { return insertionPosition - 1; } // check if the row key is before the first range if (insertionPosition == 0 && !rangeList.get(insertionPosition).contains(rowKey)) { return ROW_BEFORE_FIRST_RANGE; } if (!initialized) { initialized = true; } return insertionPosition; } // the row key equals one of the start keys, and the the range exclude the start key if(rangeList.get(index).startRowInclusive == false) { EXCLUSIVE = true; } return index; }
/** * calculate the position where the row key in the ranges list. * * @param rowKey the row key to calculate * @return index the position of the row key */ private int getNextRangeIndex(byte[] rowKey) { RowRange temp = new RowRange(rowKey, true, null, true); int index = Collections.binarySearch(rangeList, temp); if (index < 0) { int insertionPosition = -index - 1; // check if the row key in the range before the insertion position if (insertionPosition != 0 && rangeList.get(insertionPosition - 1).contains(rowKey)) { return insertionPosition - 1; } // check if the row key is before the first range if (insertionPosition == 0 && !rangeList.get(insertionPosition).contains(rowKey)) { return ROW_BEFORE_FIRST_RANGE; } if (!initialized) { initialized = true; } return insertionPosition; } // the row key equals one of the start keys, and the the range exclude the start key if(rangeList.get(index).startRowInclusive == false) { EXCLUSIVE = true; } return index; }
/** * calculate the position where the row key in the ranges list. * * @param rowKey the row key to calculate * @return index the position of the row key */ private int getNextRangeIndex(byte[] rowKey) { RowRange temp = new RowRange(rowKey, true, null, true); int index = Collections.binarySearch(rangeList, temp); if (index < 0) { int insertionPosition = -index - 1; // check if the row key in the range before the insertion position if (insertionPosition != 0 && rangeList.get(insertionPosition - 1).contains(rowKey)) { return insertionPosition - 1; } // check if the row key is before the first range if (insertionPosition == 0 && !rangeList.get(insertionPosition).contains(rowKey)) { return ROW_BEFORE_FIRST_RANGE; } if (!initialized) { initialized = true; } return insertionPosition; } // the row key equals one of the start keys, and the the range exclude the start key if(rangeList.get(index).startRowInclusive == false) { EXCLUSIVE = true; } return index; }
/** * calculate the position where the row key in the ranges list. * * @param rowKey the row key to calculate * @return index the position of the row key */ private int getNextRangeIndex(byte[] rowKey) { RowRange temp = new RowRange(rowKey, true, null, true); int index = Collections.binarySearch(rangeList, temp); if (index < 0) { int insertionPosition = -index - 1; // check if the row key in the range before the insertion position if (insertionPosition != 0 && rangeList.get(insertionPosition - 1).contains(rowKey)) { return insertionPosition - 1; } // check if the row key is before the first range if (insertionPosition == 0 && !rangeList.get(insertionPosition).contains(rowKey)) { return ROW_BEFORE_FIRST_RANGE; } if (!initialized) { initialized = true; } return insertionPosition; } // the row key equals one of the start keys, and the the range exclude the start key if(rangeList.get(index).startRowInclusive == false) { EXCLUSIVE = true; } return index; }
public boolean contains(byte[] row) { return contains(row, 0, row.length); }
public boolean contains(byte[] row) { return contains(row, 0, row.length); }
public boolean contains(byte[] row) { return contains(row, 0, row.length); }
public boolean contains(byte[] row) { return contains(row, 0, row.length); }
public boolean contains(byte[] row) { return contains(row, 0, row.length); }