IndexCollector

Trait IndexCollector 

Source
pub trait IndexCollector: Send + Sync {
    // Required methods
    fn append(&mut self, region_id: RegionId, entry_id: EntryId);
    fn truncate(&mut self, region_id: RegionId, entry_id: EntryId);
    fn set_latest_entry_id(&mut self, entry_id: EntryId);
    fn dump(&mut self, encoder: &dyn IndexEncoder);
}
Expand description

The IndexCollector trait defines the operations for managing and collecting index entries.

Required Methods§

Source

fn append(&mut self, region_id: RegionId, entry_id: EntryId)

Appends an [EntryId] for a specific region.

Source

fn truncate(&mut self, region_id: RegionId, entry_id: EntryId)

Truncates the index for a specific region up to a given [EntryId].

It removes all [EntryId]s smaller than entry_id.

Source

fn set_latest_entry_id(&mut self, entry_id: EntryId)

Sets the latest [EntryId].

Source

fn dump(&mut self, encoder: &dyn IndexEncoder)

Dumps the index.

Implementors§