pub enum CheckpointRecordLifecycle {
Active {},
Released {
released_at_ms: u64,
},
}Expand description
Lifecycle of a durable checkpoint record: monotonic, with exactly two states and one transition.
A record is born active under a freshly generated id and pins its basis
until something moves it to released by compare-and-swap — the owner
asking for it, or garbage collection observing that its expires_at_ms
passed. released is terminal: nothing returns a record to active, so
a released record protects nothing and answers no read. Garbage
collection deletes it once released_at_ms is a grace window old. A new
pin is a new record under a new id, never a revival of this one.
Variants§
Active
Protects the checkpoint basis. The sole state a read may serve from.
The braces make serde reject a stray released_at_ms; a unit variant
would silently accept and discard that field.
Released
Terminal: the pin is gone and the record is waiting to be deleted.
Trait Implementations§
Source§impl Clone for CheckpointRecordLifecycle
impl Clone for CheckpointRecordLifecycle
Source§fn clone(&self) -> CheckpointRecordLifecycle
fn clone(&self) -> CheckpointRecordLifecycle
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more