#include <bm_frame.h>
|
class | BufferManager |
|
class | ReplacementPolicy |
|
class | Clock |
|
class | Random |
|
class | LRU |
|
class | MRU |
|
class | ClockRandom |
|
Frame Class which holds metadata about corresponding Page in the buffer pool.
◆ loadFrame()
void Frame::loadFrame |
( |
PageId |
page_id | ) |
|
Updates the Frame data according to the loaded Page.
- Precondition
- None.
- Postcondition
- Frame data is updated. pin_count is set to 1, page_id is set to page_id parameter, and valid is set to true.
- Parameters
-
◆ resetFrame()
void Frame::resetFrame |
( |
| ) |
|
Resets the metadata of the Frame.
- Precondition
- None.
- Postcondition
- page_id is set to INVALID_PAGE_ID. pin_count is set to 0. valid, dirty, and ref_bit are all set to false.
◆ BufferManager
BufferManager and Policies have access to private data members of each Frame. They need direct access to Frame data fields to support synchronizing access to frames by some higher-level operations (getters/setters alone won't do it)
◆ dirty
true if the Frame is dirty. Else false.
◆ frame_mtx
std::mutex Frame::frame_mtx |
|
private |
std::mutex for synchronized access to the Page.
◆ page_id
◆ pin_count
The number of pins on the Page.
◆ valid
true if the Frame data is valid. Else false.
The documentation for this class was generated from the following file: