pub trait CompactionStrategy {
    // Required method
    fn choose(&self, _: &Levels, config: &PersistedConfig) -> Choice;
}
Expand description

Trait for a compaction strategy

The strategy receives the levels of the LSM-tree as argument and emits a choice on what to do.

Required Methods§

source

fn choose(&self, _: &Levels, config: &PersistedConfig) -> Choice

Decides on what to do based on the current state of the LSM-tree’s levels

Implementors§

source§

impl CompactionStrategy for lsm_tree::compaction::Fifo

source§

impl CompactionStrategy for lsm_tree::compaction::Levelled

source§

impl CompactionStrategy for lsm_tree::compaction::SizeTiered