private void moveToPrevious() { if (!previous.isValid()) { throw new IllegalStateException("Can move back only once and not in first key in the block."); } SeekerState tmp = previous; previous = current; current = tmp; // move after last key value currentBuffer.position(current.nextKvOffset); previous.invalidate(); }
@Override public int seekToKeyInBlock(Cell seekCell, boolean seekBefore) { previous.invalidate(); int index = binarySearch(seekCell, seekBefore); if (index < 0) {
private void moveToPrevious() { if (!previous.isValid()) { throw new IllegalStateException("Can move back only once and not in first key in the block."); } SeekerState tmp = previous; previous = current; current = tmp; // move after last key value currentBuffer.position(current.nextKvOffset); previous.invalidate(); }
@Override public int seekToKeyInBlock(Cell seekCell, boolean seekBefore) { previous.invalidate(); int index = binarySearch(seekCell, seekBefore); if (index < 0) {
@Override public int seekToKeyInBlock(Cell seekCell, boolean seekBefore) { previous.invalidate(); int index = binarySearch(seekCell, seekBefore); if (index < 0) {
protected void decodeFirst() { decodeNext(); previous.invalidate(); }
private void moveToPrevious() { if (!previous.isValid()) { throw new IllegalStateException("Can move back only once and not in first key in the block."); } SeekerState tmp = previous; previous = current; current = tmp; // move after last key value currentBuffer.position(current.nextKvOffset); previous.invalidate(); }
@Override public boolean next() { if (!currentBuffer.hasRemaining()) { return false; } decodeNext(); previous.invalidate(); return true; }
protected void decodeAtPosition(int position) { currentBuffer.position(position); decodeNext(); previous.invalidate(); }
@Override public boolean next() { if (!currentBuffer.hasRemaining()) { return false; } decodeNext(); previous.invalidate(); return true; }
protected void decodeFirst() { decodeNext(); previous.invalidate(); }
protected void decodeAtPosition(int position) { currentBuffer.position(position); decodeNext(); previous.invalidate(); }
protected void decodeFirst() { decodeNext(); previous.invalidate(); }
@Override public boolean next() { if (!currentBuffer.hasRemaining()) { return false; } decodeNext(); previous.invalidate(); return true; }
protected void decodeAtPosition(int position) { currentBuffer.position(position); decodeNext(); previous.invalidate(); }