pub(super) struct WatcherJournalSource {
roots: Vec<String>,
}Expand description
Non-elevated change source for scope mode. Holds the configured roots for Phase 2’s watchers; Phase 1 keeps them only to log/identify the session.
Fields§
§roots: Vec<String>Implementations§
Trait Implementations§
Source§impl JournalSource for WatcherJournalSource
impl JournalSource for WatcherJournalSource
Source§fn open(&mut self) -> Result<(), UsnError>
fn open(&mut self) -> Result<(), UsnError>
(Re)open the journal, creating it when missing. Positions the
cursor at the journal’s current end. Called once per establish
cycle: at start and after every journal-gone rescan.
Source§fn query(&mut self) -> Result<JournalView, UsnError>
fn query(&mut self) -> Result<JournalView, UsnError>
Live journal identity/retention for checkpoint validation.
Source§fn read_blocking(&mut self, _buf: &mut Vec<u8>) -> Result<ReadOutcome, UsnError>
fn read_blocking(&mut self, _buf: &mut Vec<u8>) -> Result<ReadOutcome, UsnError>
Blocking read of the next batch. Semantics the worker relies on:
blocks until records exist, then returns them and advances the
cursor past the batch;
Gone when the journal died under us; Err
on an unrecoverable failure. An empty Records batch is a benign
wakeup — the worker re-checks its stop flag and reads again (fakes
use this to unblock on stop; the live read returns on the next
volume write, which is what keeps Engine::shutdown’s join prompt).Source§fn journal_id(&self) -> u64
fn journal_id(&self) -> u64
Journal id of the open session (checkpoint identity).
Source§fn next_usn(&self) -> i64
fn next_usn(&self) -> i64
Cursor the next read starts at (the value persisted in checkpoints).
Source§fn set_next_usn(&mut self, _usn: i64)
fn set_next_usn(&mut self, _usn: i64)
Reposition the cursor (a snapshot restore replays from its
persisted checkpoint instead of the journal’s current end).
Source§fn open_stat_fetcher(&self) -> Result<Box<dyn StatFetcher>, UsnError>
fn open_stat_fetcher(&self) -> Result<Box<dyn StatFetcher>, UsnError>
Size/mtime fetcher bound to the same volume, opened once per tail
session. Per-record
stat calls were already dynamic (usn::apply).Auto Trait Implementations§
impl Freeze for WatcherJournalSource
impl RefUnwindSafe for WatcherJournalSource
impl Send for WatcherJournalSource
impl Sync for WatcherJournalSource
impl Unpin for WatcherJournalSource
impl UnsafeUnpin for WatcherJournalSource
impl UnwindSafe for WatcherJournalSource
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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