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

Represents a compaction task in the LSM-Tree. 更多...

#include <ob_compaction.h>

Public 成员函数

 ObCompaction (int level)
 Constructs a compaction task targeting a specific level. 更多...
 
int level () const
 Gets the target level for this compaction. 更多...
 
shared_ptr< ObSSTableinput (int which, int i) const
 Retrieves an SSTable from the input SSTable list. 更多...
 
int size () const
 Computes the total number of input SSTables for the compaction task. 更多...
 
const vector< shared_ptr< ObSSTable > > & inputs (int which) const
 Retrieves the vector of SSTables from the specified input level.
 

Private 属性

std::vector< shared_ptr< ObSSTable > > inputs_ [2]
 Each compaction reads inputs from "level_" and "level_+1"
 
int level_
 The current level of SSTables involved in the compaction.
 

友元

class ObCompactionPicker
 Grants access to private members of this class to compaction picker classes. 更多...
 
class TiredCompactionPicker
 
class LeveledCompactionPicker
 

详细描述

Represents a compaction task in the LSM-Tree.

This class encapsulates the metadata and operations for a single compaction task, including input SSTables and the target level of the compaction.

构造及析构函数说明

◆ ObCompaction()

oceanbase::ObCompaction::ObCompaction ( int  level)
inlineexplicit

Constructs a compaction task targeting a specific level.

参数
levelThe current level of the SSTables involved in the compaction.

成员函数说明

◆ input()

shared_ptr< ObSSTable > oceanbase::ObCompaction::input ( int  which,
int  i 
) const
inline

Retrieves an SSTable from the input SSTable list.

参数
whichIndex indicating which level's inputs to access (0 for level_, 1 for level_ + 1).
iIndex of the SSTable within the specified level's inputs.
返回
A shared pointer to the specified SSTable.

◆ level()

int oceanbase::ObCompaction::level ( ) const
inline

Gets the target level for this compaction.

返回
The integer value representing the level.

◆ size()

int oceanbase::ObCompaction::size ( ) const
inline

Computes the total number of input SSTables for the compaction task.

返回
The total number of input SSTables across both levels.

友元及相关函数文档

◆ ObCompactionPicker

friend class ObCompactionPicker
friend

Grants access to private members of this class to compaction picker classes.

参见
ObCompactionPicker, TiredCompactionPicker, LeveledCompactionPicker

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