SwatDB
Loading...
Searching...
No Matches
Public Member Functions | List of all members
HashDirPage Class Reference

#include <hashdirpage.h>

Inheritance diagram for HashDirPage:
Inheritance graph
[legend]
Collaboration diagram for HashDirPage:
Collaboration graph
[legend]

Public Member Functions

 HashDirPage ()=delete
 Constructor.
 
 ~HashDirPage ()
 
void setEntry (SlotId slot_id, PageNum page_num)
 Setter function for an entry identified by SlotId.
 
PageNum getEntry (SlotId slot_id)
 Getter function for retrieving PageNum entry identified by SlotId.
 
- Public Member Functions inherited from Page
 Page ()
 Constructor.
 
 ~Page ()
 Destructor.
 
char * getData ()
 Get function for the data char array.
 

Additional Inherited Members

- Protected Attributes inherited from Page
char data [PAGE_SIZE]
 char array that stores the page data. Derived classes could map appropriate structures on it.
 

Detailed Description

SwatDB HashDirPage Class. HashDirPage inherits from base Page class and instantiates HashDirPage, collection of which, form the directory part of HashIndexFile.

Constructor & Destructor Documentation

◆ HashDirPage()

HashDirPage::HashDirPage ( )
delete

Constructor.

Constructor should never be called. It should be always the case that base class Page constructor is called by the BufferManager when initializing bufferpool. HashDirPage Pointer is casted to whatever Page pointer returned by the BufferManager

◆ ~HashDirPage()

HashDirPage::~HashDirPage ( )
inline

Destructor

Member Function Documentation

◆ getEntry()

PageNum HashDirPage::getEntry ( SlotId  slot_id)

Getter function for retrieving PageNum entry identified by SlotId.

Precondition
The provided SlotId is valid (less than MAX_HASH_DIRSLOT).
Postcondition
Appropriate PageNum is returned.
Parameters
slot_idSlotId of the Entry to be retrieved
Exceptions
InvalidSlotHashDirPageIf the provided slot_id is greater than or equal to MAX_HASH_DIRSLOT.

◆ setEntry()

void HashDirPage::setEntry ( SlotId  slot_id,
PageNum  page_num 
)

Setter function for an entry identified by SlotId.

Precondition
The provided SlotId is valid (less than MAX_HASH_DIRSLOT).
Postcondition
The entry at the given slot is set to the given PageNum.
Parameters
slot_idThe SlotId of the entry that is set.
page_numThe PageNum the entry is set to.
Exceptions
InvalidSlotHashDirPageIf the provided slot_id is greater than or equal to MAX_HASH_DIRSLOT.

The documentation for this class was generated from the following file: