MiniOB 1
MiniOB is one mini database, helping developers to learn how database works.
|
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< ObSSTable > | input (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.
|
inlineexplicit |
Constructs a compaction task targeting a specific level.
level | The current level of the SSTables involved in the compaction. |
|
inline |
|
inline |
Gets the target level for this compaction.
|
inline |
Computes the total number of input SSTables for the compaction task.
|
friend |
Grants access to private members of this class to compaction picker classes.