10#ifndef _SWATDB_HASHBUCKETPAGE_H_
11#define _SWATDB_HASHBUCKETPAGE_H_
295 SlotId _getFreeSlot();
312 SlotInfo* _getSlotInfo(SlotId slot_id);
331 void _insertEntry(SlotId slot_id,
Key key,
RecordId record_id);
353 void _deleteEntry(SlotId slot_id);
Definition hashbucketpagescanner.h:26
Definition hashbucketpage.h:95
HashBucketPageHeader getHeader()
THIS METHOD IS FOR DEBUGGING ONLY. Returns this HashBucketPage's header information.
SlotId insertEntry(Key key, RecordId record_id)
Inserts given Key and RecordId to the Page.
void setLevel(Level new_level)
Setter function for the local level of the bucket.
void deleteEntry(SlotId slot_id)
Deletes Entry identified by SlotId.
RecordId getEntry(SlotId slot_id, Data *data)
Gets the entry identified by SlotId.
SlotInfo getSlotInfo(SlotId slot_id)
THIS METHOD IS FOR DEBUGGING ONLY. Returns SlotInfo struct of the given SlotId.
Level getLevel()
Getter function for the local level of the bucket.
void initializeHeader()
Initializes header information after the Page is allocated.
SlotInfo * _getSlotDirectory()
Return pointer to the where slot directory begins (first SlotInfo)
bool isFull()
bool function indicating whether the Page is full.
HashBucketPageHeader * _getPageHeader()
Getter for the Page header.
~HashBucketPage()
Definition hashbucketpage.h:115
void printHashBucketPageState()
THIS METHOD IS FOR DEBUGGING ONLY. Prints the current state of the HashBucketPage.
std::uint32_t getInvalidNum()
THIS METHOD IS FOR DEBUGGING ONLY. Returns number of invalid slots in the HashBucketPage.
HashBucketPage()=delete
Constructor.
std::uint32_t getFreeSpace()
Getter for the amount of free space free on the Page.
bool isEmpty()
bool function indicating whether the Page is empty.
Definition hashindexscanner.h:41
char data[PAGE_SIZE]
char array that stores the page data. Derived classes could map appropriate structures on it.
Definition page.h:60
Definition swatdb_types.h:70
Definition hashbucketpage.h:76
std::uint32_t offset
Definition hashbucketpage.h:82
std::uint32_t length
Definition hashbucketpage.h:87
std::uint32_t Level
Definition swatdb_types.h:130
std::uint32_t PageNum
Definition swatdb_types.h:38