pub struct ScheduledSemanticRefresh { /* private fields */ }Expand description
Explicit periodic schedule for verified semantic memory refresh.
The schedule always requires atomic global index-revision CAS. This prevents
independently constructed session runtimes from silently falling back to a
process-local ordering guarantee. Construction is inert; a worker starts
only after the schedule is installed in super::MemoryMaintenanceOptions
and an asynchronous session is built. Clones form one ownership family, so
only one active maintenance runtime can publish its shared receipt and
metrics epoch at once.
Implementations§
Source§impl ScheduledSemanticRefresh
impl ScheduledSemanticRefresh
pub fn try_new(interval: Duration) -> Result<Self, MemoryMaintenanceError>
Sourcepub fn try_new_with_checkpoint(
interval: Duration,
checkpoint: DurableMemorySemanticRefreshCheckpoint,
) -> Result<Self, MemoryMaintenanceError>
pub fn try_new_with_checkpoint( interval: Duration, checkpoint: DurableMemorySemanticRefreshCheckpoint, ) -> Result<Self, MemoryMaintenanceError>
Construct a schedule that verifies and adopts persisted refresh evidence.
The checkpoint never authorizes the repository-token fast path. Its first run reads a complete bounded Active snapshot and checks the current index before it can become this ownership epoch’s successful receipt.
pub fn interval(&self) -> Duration
pub fn required_consistency(&self) -> VectorMutationConsistency
Sourcepub fn last_receipt(&self) -> Option<DurableMemorySemanticRefreshReceipt>
pub fn last_receipt(&self) -> Option<DurableMemorySemanticRefreshReceipt>
Return the most recent successful, secret-free refresh receipt.
Clones share this observation state for one active ownership epoch. A failed later run leaves the last successful receipt intact while generic maintenance health records the failure. A replacement owner starts a new epoch and clears the process-local receipt before its first run, so an optional source change token is never reused across repository owners.
Sourcepub fn metrics(&self) -> SemanticRefreshMetrics
pub fn metrics(&self) -> SemanticRefreshMetrics
Return bounded, non-sensitive evidence for the current ownership epoch.
A never-owned schedule reports epoch zero. Clean close retains the last epoch for inspection; a successful replacement claim increments the epoch and clears all prior counters and recent runs.
Trait Implementations§
Source§impl Clone for ScheduledSemanticRefresh
impl Clone for ScheduledSemanticRefresh
Source§fn clone(&self) -> ScheduledSemanticRefresh
fn clone(&self) -> ScheduledSemanticRefresh
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ScheduledSemanticRefresh
impl RefUnwindSafe for ScheduledSemanticRefresh
impl Send for ScheduledSemanticRefresh
impl Sync for ScheduledSemanticRefresh
impl Unpin for ScheduledSemanticRefresh
impl UnsafeUnpin for ScheduledSemanticRefresh
impl UnwindSafe for ScheduledSemanticRefresh
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
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> ⓘ
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> ⓘ
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