@InterfaceAudience.Private public interface CellSearcher extends ReversibleCellScanner
Cell
inside a sorted collection of cells. Indicates that
the implementation is able to navigate between cells without iterating through every cell.Modifier and Type | Method and Description |
---|---|
void |
positionAfterLastCell()
Note: This may not be appropriate to have in the interface.
|
boolean |
positionAt(Cell key)
Do everything within this scanner's power to find the key.
|
CellScannerPosition |
positionAtOrAfter(Cell key)
Same as positionAt(..), but go to the extra effort of finding the next key if there's no exact
match.
|
CellScannerPosition |
positionAtOrBefore(Cell key)
Same as positionAt(..), but go to the extra effort of finding the previous key if there's no
exact match.
|
void |
resetToBeforeFirstEntry()
Reset any state in the scanner so it appears it was freshly opened.
|
boolean |
seekForwardTo(Cell key)
Note: Added for backwards compatibility with
KeyValueScanner.reseek(org.apache.hadoop.hbase.Cell)
Look for the key, but only look after the current position. |
CellScannerPosition |
seekForwardToOrAfter(Cell key)
Same as seekForwardTo(..), but go to the extra effort of finding the next key if there's no
exact match.
|
CellScannerPosition |
seekForwardToOrBefore(Cell key)
Same as seekForwardTo(..), but go to the extra effort of finding the next key if there's no
exact match.
|
previous, previousRow
advance, current
void resetToBeforeFirstEntry()
boolean positionAt(Cell key)
key
- position the CellScanner exactly on this keyCellScannerPosition positionAtOrBefore(Cell key)
key
- position the CellScanner on this key or the closest cell beforeCellScannerPosition positionAtOrAfter(Cell key)
key
- position the CellScanner on this key or the closest cell afterboolean seekForwardTo(Cell key)
KeyValueScanner.reseek(org.apache.hadoop.hbase.Cell)
Look for the key, but only look after the current position. Probably not needed for an
efficient tree implementation, but is important for implementations without random access such
as unencoded KeyValue blocks.
key
- position the CellScanner exactly on this keyCellScannerPosition seekForwardToOrBefore(Cell key)
key
- CellScannerPosition seekForwardToOrAfter(Cell key)
key
- void positionAfterLastCell()
Copyright © 2007-2016 The Apache Software Foundation. All Rights Reserved.