|
tinySQL
0.1
A self-contained database management system
|
The storage details of each page in the memory. More...
#include <buffer_manager.h>
Public Member Functions | |
| Page () | |
| Construct a new Page:: Page object. More... | |
| void | initialize () |
| 初始化 More... | |
| void | setFileName (std::string file_name) |
| std::string | getFileName () const |
| void | setBlockId (int block_id) |
| int | getBlockId () const |
| void | setPinCount (int pin_count) |
| int | getPinCount () const |
| void | setDirty (bool dirty) |
| bool | isDirty () const |
| void | setAvaliable (bool avaliable) |
| bool | getAvaliable () const |
| void | setTime () |
| long long | getTime () |
| char * | getBuffer () |
| std::string | getPageStrId () |
Static Public Member Functions | |
| static std::string | generatePageStrId (const std::string &file_path, int b_id) |
Public Attributes | |
| char | buffer_ [PAGESIZE] |
| std::string | file_name_ |
| int | block_id_ |
| int | pin_count_ |
| bool | dirty_ |
| bool | avaliable_ |
| long long | last_access_time |
The storage details of each page in the memory.
Definition at line 30 of file buffer_manager.h.
| Page::Page | ( | ) |
Construct a new Page:: Page object.
Definition at line 19 of file buffer_manager.cpp.

| void Page::initialize | ( | ) |
| bool Page::avaliable_ |
avaliable标示页是否可以被使用(即将磁盘块load进该页)
Definition at line 53 of file buffer_manager.h.
| int Page::block_id_ |
页在所在文件中的块号(磁盘中通常叫块)
Definition at line 50 of file buffer_manager.h.
| char Page::buffer_[PAGESIZE] |
每一页都是一个大小为PAGESIZE字节的数组
Definition at line 48 of file buffer_manager.h.
| bool Page::dirty_ |
dirty记录页是否被修改
Definition at line 52 of file buffer_manager.h.
| std::string Page::file_name_ |
页所对应的文件名
Definition at line 49 of file buffer_manager.h.
| int Page::pin_count_ |
记录被钉住的次数。被钉住的意思就是不可以被替换
Definition at line 51 of file buffer_manager.h.
1.8.17