pub struct CaptureObjectBatch { /* private fields */ }Expand description
Capture-local object publication with deferred directory durability, but durable file data.
Finish this batch before publishing any manifest root. Existing LocalObjectStore::put_bytes
keeps its immediate durability contract; only this explicitly scoped API batches directory sync.
Implementations§
Source§impl CaptureObjectBatch
impl CaptureObjectBatch
Sourcepub fn new(store: LocalObjectStore, previous: &[AdmittedObject]) -> Self
pub fn new(store: LocalObjectStore, previous: &[AdmittedObject]) -> Self
Start a new batch, retaining only explicitly supplied previous-generation capabilities.
Sourcepub fn put_bytes(&self, bytes: &[u8]) -> ImageResult<ObjectId>
pub fn put_bytes(&self, bytes: &[u8]) -> ImageResult<ObjectId>
Hash new bytes once and store durable file data. Directory entries commit at finish.
Sourcepub fn link_into(
&self,
id: &ObjectId,
closure_root: &Path,
) -> ImageResult<PathBuf>
pub fn link_into( &self, id: &ObjectId, closure_root: &Path, ) -> ImageResult<PathBuf>
Link admitted bytes without rehashing the generation’s complete inherited RAM payload.
Sourcepub fn finish(&self) -> ImageResult<CaptureObjectBatchStats>
pub fn finish(&self) -> ImageResult<CaptureObjectBatchStats>
Make every new directory entry durable before its caller publishes a root descriptor. Call only after all batch writers have joined. A failed sync leaves the set available for retry.
Sourcepub fn retained_objects(
&self,
ids: &[ObjectId],
) -> ImageResult<Vec<AdmittedObject>>
pub fn retained_objects( &self, ids: &[ObjectId], ) -> ImageResult<Vec<AdmittedObject>>
Retain exactly the next generation’s referenced receipts without keeping object FDs open.
Sourcepub fn stats(&self) -> CaptureObjectBatchStats
pub fn stats(&self) -> CaptureObjectBatchStats
Read counters without adding timing or content-verification work.