MiniOB 1
MiniOB is one mini database, helping developers to learn how database works.
载入中...
搜索中...
未找到
Public 成员函数 | 静态 Public 成员函数 | Private 属性 | 所有成员列表
bplus_tree::SetParentPageLogEntryHandler类 参考

设置父节点日志处理类 更多...

#include <bplus_tree_log_entry.h>

类 bplus_tree::SetParentPageLogEntryHandler 继承关系图:
bplus_tree::NodeLogEntryHandler bplus_tree::LogEntryHandler

Public 成员函数

 SetParentPageLogEntryHandler (Frame *frame, PageNum parent_page_num, PageNum old_parent_page_num)
 
RC serialize_body (common::Serializer &buffer) const override
 序列化日志内容。所有子类应该实现这个函数 更多...
 
RC rollback (BplusTreeMiniTransaction &mtr, BplusTreeHandler &tree_handler) override
 回滚 更多...
 
RC redo (BplusTreeMiniTransaction &mtr, BplusTreeHandler &tree_handler) override
 重做 更多...
 
string to_string () const override
 
PageNum parent_page_num () const
 
- Public 成员函数 继承自 bplus_tree::NodeLogEntryHandler
 NodeLogEntryHandler (LogOperation operation, Frame *frame)
 
- Public 成员函数 继承自 bplus_tree::LogEntryHandler
 LogEntryHandler (LogOperation operation, Frame *frame=nullptr)
 
Frameframe ()
 返回日志对应的frame 更多...
 
const Frameframe () const
 
PageNum page_num () const
 
void set_page_num (PageNum page_num)
 
LogOperation operation_type () const
 日志操作类型
 
RC serialize (common::Serializer &buffer) const
 序列化日志
 
RC serialize_header (common::Serializer &buffer) const
 序列化日志头
 
virtual RC serialize_body (common::Serializer &buffer) const =0
 序列化日志内容。所有子类应该实现这个函数 更多...
 
virtual RC rollback (BplusTreeMiniTransaction &mtr, BplusTreeHandler &tree_handler)=0
 回滚 更多...
 
virtual RC redo (BplusTreeMiniTransaction &mtr, BplusTreeHandler &tree_handler)=0
 重做 更多...
 
virtual string to_string () const
 

静态 Public 成员函数

static RC deserialize (Frame *frame, common::Deserializer &buffer, unique_ptr< LogEntryHandler > &handler)
 
- 静态 Public 成员函数 继承自 bplus_tree::LogEntryHandler
static RC from_buffer (function< RC(PageNum, Frame *&)> frame_getter, common::Deserializer &buffer, unique_ptr< LogEntryHandler > &handler)
 从buffer中反序列化出一个LogEntryHandler 更多...
 
static RC from_buffer (DiskBufferPool &buffer_pool, common::Deserializer &buffer, unique_ptr< LogEntryHandler > &handler)
 
static RC from_buffer (common::Deserializer &deserializer, unique_ptr< LogEntryHandler > &handler)
 

Private 属性

PageNum parent_page_num_ = -1
 
PageNum old_parent_page_num_ = -1
 

额外继承的成员函数

- Protected 属性 继承自 bplus_tree::LogEntryHandler
LogOperation operation_type_
 
Frameframe_ = nullptr
 
PageNum page_num_ = BP_INVALID_PAGE_NUM
 page num本来存放在frame中。但是只有在运行时才能拿到frame,为了强制适配 解析文件buffer时不存在运行时的情况,直接记录page num
 

详细描述

设置父节点日志处理类

成员函数说明

◆ redo()

RC bplus_tree::SetParentPageLogEntryHandler::redo ( BplusTreeMiniTransaction mtr,
BplusTreeHandler tree_handler 
)
overridevirtual

重做

在系统重启时,需要根据日志内容进行重做

实现了 bplus_tree::LogEntryHandler.

◆ rollback()

RC bplus_tree::SetParentPageLogEntryHandler::rollback ( BplusTreeMiniTransaction mtr,
BplusTreeHandler tree_handler 
)
overridevirtual

回滚

在事务回滚时,需要根据日志内容进行回滚

实现了 bplus_tree::LogEntryHandler.

◆ serialize_body()

RC bplus_tree::SetParentPageLogEntryHandler::serialize_body ( common::Serializer buffer) const
overridevirtual

序列化日志内容。所有子类应该实现这个函数

实现了 bplus_tree::LogEntryHandler.

◆ to_string()

string bplus_tree::SetParentPageLogEntryHandler::to_string ( ) const
overridevirtual

该类的文档由以下文件生成: