Trait CompactionSelector

Source
pub trait CompactionSelector: Sync + Send {
    // Required methods
    fn pick_compaction(
        &mut self,
        task_id: HummockCompactionTaskId,
        context: CompactionSelectorContext<'_>,
    ) -> Option<CompactionTask>;
    fn name(&self) -> &'static str;
    fn task_type(&self) -> TaskType;

    // Provided method
    fn report_statistic_metrics(&self, _metrics: &MetaMetrics) { ... }
}

Required Methods§

Source

fn pick_compaction( &mut self, task_id: HummockCompactionTaskId, context: CompactionSelectorContext<'_>, ) -> Option<CompactionTask>

Source

fn name(&self) -> &'static str

Source

fn task_type(&self) -> TaskType

Provided Methods§

Implementors§