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§
Sourcefn append(&mut self, region_id: RegionId, entry_id: EntryId)
fn append(&mut self, region_id: RegionId, entry_id: EntryId)
Appends an [EntryId
] for a specific region.
Sourcefn truncate(&mut self, region_id: RegionId, entry_id: EntryId)
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
.
Sourcefn set_latest_entry_id(&mut self, entry_id: EntryId)
fn set_latest_entry_id(&mut self, entry_id: EntryId)
Sets the latest [EntryId
].
Sourcefn dump(&mut self, encoder: &dyn IndexEncoder)
fn dump(&mut self, encoder: &dyn IndexEncoder)
Dumps the index.