@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) |
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)
Do everything within this scanner's power to find the key. Look forward and backwards.
Abort as soon as we know it can't be found, possibly leaving the Searcher in an invalid state.
key
- position the CellScanner exactly on this keyCellScannerPosition positionAtOrBefore(Cell key)
Same as positionAt(..), but go to the extra effort of finding the previous key if there's no exact match.
key
- position the CellScanner on this key or the closest cell beforeCellScannerPosition positionAtOrAfter(Cell key)
Same as positionAt(..), but go to the extra effort of finding the next key if there's no exact match.
key
- position the CellScanner on this key or the closest cell afterboolean 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. 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)
Same as seekForwardTo(..), but go to the extra effort of finding the next key if there's no exact match.
key
- CellScannerPosition seekForwardToOrAfter(Cell key)
Same as seekForwardTo(..), but go to the extra effort of finding the next key if there's no exact match.
key
- void positionAfterLastCell()
Note: This may not be appropriate to have in the interface. Need to investigate.
Position the scanner in an invalid state after the last cell: CellScannerPosition.AFTER_LAST. This is used by tests and for handling certain edge cases.Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.