pub struct AsyncIndexManager { /* private fields */ }Expand description
Async index manager for parallel operations
Implementations§
Source§impl AsyncIndexManager
impl AsyncIndexManager
Sourcepub fn new(config: AsyncIndexConfig) -> Self
pub fn new(config: AsyncIndexConfig) -> Self
Create a new async index manager
Sourcepub async fn load_directory(&self, path: &Path) -> Result<usize>
pub async fn load_directory(&self, path: &Path) -> Result<usize>
Load all indices from a directory in parallel
Sourcepub async fn lookup(&self, ekey: &EKey) -> Option<ArchiveLocation>
pub async fn lookup(&self, ekey: &EKey) -> Option<ArchiveLocation>
Perform an async lookup
Sourcepub async fn lookup_batch(&self, ekeys: &[EKey]) -> Vec<Option<ArchiveLocation>>
pub async fn lookup_batch(&self, ekeys: &[EKey]) -> Vec<Option<ArchiveLocation>>
Batch lookup for multiple keys
Sourcepub async fn start_background_updates(&self, path: PathBuf, interval: Duration)
pub async fn start_background_updates(&self, path: PathBuf, interval: Duration)
Start background index updates
Sourcepub async fn stop_background_updates(&self)
pub async fn stop_background_updates(&self)
Stop background updates
Sourcepub async fn get_stats(&self) -> IndexStats
pub async fn get_stats(&self) -> IndexStats
Get statistics about loaded indices
Sourcepub async fn clear_cache(&self)
pub async fn clear_cache(&self)
Clear all caches
Auto Trait Implementations§
impl Freeze for AsyncIndexManager
impl !RefUnwindSafe for AsyncIndexManager
impl Send for AsyncIndexManager
impl Sync for AsyncIndexManager
impl Unpin for AsyncIndexManager
impl !UnwindSafe for AsyncIndexManager
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more