org.apache.hadoop.hbase.codec.prefixtree.scanner
Interface ReversibleCellScanner

All Superinterfaces:
CellScanner
All Known Subinterfaces:
CellSearcher
All Known Implementing Classes:
PrefixTreeArrayReversibleScanner, PrefixTreeArraySearcher

@InterfaceAudience.Private
public interface ReversibleCellScanner
extends CellScanner

An extension of CellScanner indicating the scanner supports iterating backwards through cells.

Note: This was not added to suggest that HBase should support client facing reverse Scanners, but because some CellSearcher implementations, namely PrefixTree, need a method of backing up if the positionAt(..) method goes past the requested cell.


Method Summary
 boolean previous()
          Try to position the scanner one Cell before the current position.
 boolean previousRow(boolean endOfRow)
          Try to position the scanner in the row before the current row.
 
Methods inherited from interface org.apache.hadoop.hbase.CellScanner
advance, current
 

Method Detail

previous

boolean previous()
Try to position the scanner one Cell before the current position.

Returns:
true if the operation was successful, meaning getCurrentCell() will return a valid Cell.
false if there were no previous cells, meaning getCurrentCell() will return null. Scanner position will be CellScannerPosition.BEFORE_FIRST

previousRow

boolean previousRow(boolean endOfRow)
Try to position the scanner in the row before the current row.

Parameters:
endOfRow - true for the last cell in the previous row; false for the first cell
Returns:
true if the operation was successful, meaning getCurrentCell() will return a valid Cell.
false if there were no previous cells, meaning getCurrentCell() will return null. Scanner position will be CellScannerPosition.BEFORE_FIRST


Copyright © 2007-2016 The Apache Software Foundation. All Rights Reserved.