#include <hashbucketpagescanner.h>
|
HashBucketPage * | page |
| Page to be scanned. The Page is pinned outside the scope of the scanner.
|
|
SlotId | cur_slot |
| Current slot being scanned.
|
|
Scanner fo HashBucketPage. Used internally in the HashIndexFile.
◆ HashBucketPageScanner()
Constructor.
- Precondition
- Valid HashBucketPage* is provided as input. The given Page is pinned.
- Postcondition
- HashBucketPageScanner is constructed with initialized data members. page is still pinned.
- Parameters
-
◆ getNext()
std::pair< SlotId, SlotInfo > HashBucketPageScanner::getNext |
( |
| ) |
|
Returns pair of SlotId and SlotInfo of the next valid slot.
- Precondition
- Page is pinned.
- Postcondition
- SlotId and SlotInfo of the next valid slot is returned. Current slot field is set to the next SlotId. Current slot field may be incremented by more than one. If the scanner reaches the end of the slot directory, INVALID_SLOT_ID is returned. page is still pinned.
- Returns
- Next valid SlotId and SlotInfo. INVALID_SLOT_ID if the end of the Page is reached. page is still pinned.
◆ reset()
Resets the scanner, so it could be used for another Page.
- Precondition
- The new Page is pinned.
- Postcondition
- page is set to the provided HashBucketPage* and current slot is reset to 0. The new Page is still pinned.
- Parameters
-
The documentation for this class was generated from the following file: