MiniOB
1
MiniOB is one mini database, helping developers to learn how database works.
载入中...
搜索中...
未找到
src
observer
storage
clog
log_replayer.h
1
/* Copyright (c) 2021-2022 OceanBase and/or its affiliates. All rights reserved.
2
miniob is licensed under Mulan PSL v2.
3
You can use this software according to the terms and conditions of the Mulan PSL v2.
4
You may obtain a copy of Mulan PSL v2 at:
5
http://license.coscl.org.cn/MulanPSL2
6
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
7
EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
8
MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
9
See the Mulan PSL v2 for more details. */
10
11
//
12
// Created by wangyunlai on 2024/01/30
13
//
14
15
#pragma once
16
17
#include "common/sys/rc.h"
18
19
class
LogEntry
;
20
25
class
LogReplayer
26
{
27
public
:
28
LogReplayer
() =
default
;
29
virtual
~LogReplayer
() =
default
;
30
36
virtual
RC
replay
(
const
LogEntry
&entry) = 0;
37
41
virtual
RC
on_done
() {
return
RC::SUCCESS; }
42
};
LogEntry
描述一条日志
Definition:
log_entry.h:44
LogReplayer
日志回放接口类
Definition:
log_replayer.h:26
LogReplayer::on_done
virtual RC on_done()
当所有日志回放完成时的回调函数
Definition:
log_replayer.h:41
LogReplayer::replay
virtual RC replay(const LogEntry &entry)=0
回放一条日志
制作者
1.9.5