pub struct IndexerPool { /* private fields */ }Expand description
One indexer per account, created on first push from that account.
Implementations§
Source§impl IndexerPool
impl IndexerPool
Sourcepub fn new(archive: &Path, journal: Option<PathBuf>) -> Result<Self>
pub fn new(archive: &Path, journal: Option<PathBuf>) -> Result<Self>
archive is opened read-only by the workers to pread extents back.
Pack rows only; see with_absorber.
Sourcepub fn with_absorber(
archive: &Path,
shared: Option<Arc<File>>,
journal: Option<PathBuf>,
absorber: Arc<dyn ObjectAbsorb>,
) -> Result<Self>
pub fn with_absorber( archive: &Path, shared: Option<Arc<File>>, journal: Option<PathBuf>, absorber: Arc<dyn ObjectAbsorb>, ) -> Result<Self>
The same pool with the object-level half wired in.
shared is the writer’s own open file description on the same blob file
(ArchiveWrite::blobs_shared). Passing it is what keeps an open store
at one descriptor on objects.pack instead of three: the workers
only ever read_exact_at, so a description they share with the writer
and with the absorber behaves identically to one of their own. None
falls back to opening it, which is what a bench with no store does.
Sourcepub fn indexer(&self, account: &str) -> Arc<AccountIndexer> ⓘ
pub fn indexer(&self, account: &str) -> Arc<AccountIndexer> ⓘ
This account’s indexer, started on first use.
Sourcepub fn wait_caught_up(&self)
pub fn wait_caught_up(&self)
Block until every account’s index has caught up.
Sourcepub fn cancel_all(&self)
pub fn cancel_all(&self)
Cancel every account’s worker; see AccountIndexer::cancel.