pub struct GcCoordinator { /* private fields */ }Expand description
Coordinator for distributed garbage collection.
Implementations§
Source§impl GcCoordinator
impl GcCoordinator
Sourcepub fn report_active_blobs(&mut self, report: NodeBlobReport)
pub fn report_active_blobs(&mut self, report: NodeBlobReport)
Receive a node’s report of its active and pinned blob sets.
Sourcepub fn run_gc_cycle(&mut self) -> GcCycleResult
pub fn run_gc_cycle(&mut self) -> GcCycleResult
Run a full GC cycle: compute the global active set, identify unreferenced blobs, respect the grace period, and return the cycle result.
Sourcepub fn unpin_blob(&mut self, hash: [u8; 32])
pub fn unpin_blob(&mut self, hash: [u8; 32])
Unpin a blob, allowing it to be collected if unreferenced.
Sourcepub fn register_blob(&mut self, hash: [u8; 32])
pub fn register_blob(&mut self, hash: [u8; 32])
Register a new blob in the known set as active.
Sourcepub fn get_status(&self, hash: &[u8; 32]) -> Option<&BlobStatus>
pub fn get_status(&self, hash: &[u8; 32]) -> Option<&BlobStatus>
Query the status of a blob.
Sourcepub fn prune_stale_nodes(&mut self) -> Vec<NodeId> ⓘ
pub fn prune_stale_nodes(&mut self) -> Vec<NodeId> ⓘ
Remove reports from nodes whose timestamps are older than the stale threshold.
Sourcepub fn collection_history(&self) -> &[CollectionEvent]
pub fn collection_history(&self) -> &[CollectionEvent]
Return the collection history log.
Auto Trait Implementations§
impl Freeze for GcCoordinator
impl RefUnwindSafe for GcCoordinator
impl Send for GcCoordinator
impl Sync for GcCoordinator
impl Unpin for GcCoordinator
impl UnsafeUnpin for GcCoordinator
impl UnwindSafe for GcCoordinator
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more