Hash table class to keep track of pages in the buffer pool. More...
#include <bufHashTbl.h>
Public Member Functions | |
| BufHashTbl (const int htSize) | |
| ~BufHashTbl () | |
| void | insert (const File *file, const PageId pageNo, const FrameId frameNo) |
| void | lookup (const File *file, const PageId pageNo, FrameId &frameNo) |
| void | remove (const File *file, const PageId pageNo) |
Hash table class to keep track of pages in the buffer pool.
Definition at line 45 of file bufHashTbl.h.
| badgerdb::BufHashTbl::BufHashTbl | ( | const int | htSize | ) |
Constructor of BufHashTbl class
Definition at line 26 of file bufHashTbl.cpp.
| badgerdb::BufHashTbl::~BufHashTbl | ( | ) |
Insert entry into hash table mapping (file, pageNo) to frameNo.
| file | File object |
| pageNo | Page number in the file |
| frameNo | Frame number assigned to that page of the file |
| HashAlreadyPresentException | if the corresponding page already exists in the hash table |
| HashTableException | (optional) if could not create a new bucket as running of memory |
Definition at line 48 of file bufHashTbl.cpp.
Check if (file, pageNo) is currently in the buffer pool (ie. in the hash table).
| HashNotFoundException | if the page entry is not found in the hash table |
Definition at line 70 of file bufHashTbl.cpp.
Delete entry (file,pageNo) from hash table.
| HashNotFoundException | if the page entry is not found in the hash table |
Definition at line 86 of file bufHashTbl.cpp.
1.8.6