Skip to main content

OverlapStrategy

Trait OverlapStrategy 

Source
pub trait OverlapStrategy: Send + Sync {
    // Required methods
    fn check_overlap(&self, a: &SstableInfo, b: &SstableInfo) -> bool;
    fn create_overlap_info(&self) -> Box<dyn OverlapInfo>;

    // Provided methods
    fn check_base_level_overlap(
        &self,
        tables: &[SstableInfo],
        others: &[SstableInfo],
    ) -> Vec<SstableInfo> { ... }
    fn check_overlap_with_range(
        &self,
        range: &KeyRange,
        others: &[SstableInfo],
    ) -> Vec<SstableInfo> { ... }
    fn check_overlap_range_with_hint(
        &self,
        range: &KeyRange,
        others: &[SstableInfo],
        _previous: Option<Range<usize>>,
    ) -> Range<usize> { ... }
}

Required Methods§

Provided Methods§

Source

fn check_base_level_overlap( &self, tables: &[SstableInfo], others: &[SstableInfo], ) -> Vec<SstableInfo>

Source

fn check_overlap_with_range( &self, range: &KeyRange, others: &[SstableInfo], ) -> Vec<SstableInfo>

Source

fn check_overlap_range_with_hint( &self, range: &KeyRange, others: &[SstableInfo], _previous: Option<Range<usize>>, ) -> Range<usize>

Find overlaps in ordered, non-overlapping others. previous may contain the preceding query’s result on the same others; both query boundaries must be nondecreasing. Strategies may ignore the hint.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§