pub struct FileCheckpointPagedLog { /* private fields */ }Expand description
Owns native devices at path, .bank0 and .bank1, with independently
selected .mirror copies of the root and banks. Acquires every writer fence
before validation or repair.
Close never flushes pending records; it attempts every device in reverse
order, root last. Uncertain cleanup retains the affected native writer fence.
Implementations§
Source§impl FileCheckpointPagedLog
impl FileCheckpointPagedLog
pub fn with_options( path: impl AsRef<Path>, options: FileCheckpointOptions, ) -> Result<Self, LinkError>
pub fn open( path: impl AsRef<Path>, mirrored_banks: bool, ) -> Result<Self, LinkError>
pub fn with_max_pages( path: impl AsRef<Path>, mirrored_banks: bool, max_pages: u64, ) -> Result<Self, LinkError>
pub fn epoch(&self) -> Result<u64, LinkError>
pub fn close(&mut self) -> Result<(), LinkError>
Trait Implementations§
Source§impl Drop for FileCheckpointPagedLog
impl Drop for FileCheckpointPagedLog
Source§impl ReplaceableTransitionLogStore for FileCheckpointPagedLog
impl ReplaceableTransitionLogStore for FileCheckpointPagedLog
Source§fn replace_log_entries(&mut self, entries: &[String]) -> Result<bool, LinkError>
fn replace_log_entries(&mut self, entries: &[String]) -> Result<bool, LinkError>
Returns false when an identical committed journal needs no replacement.
Pending unflushed records must be rejected before changing durable state.
Source§fn supports_replacement(&self) -> bool
fn supports_replacement(&self) -> bool
Dynamic adapters can expose the capability only when their inner log can.
Source§impl TransitionLogStore for FileCheckpointPagedLog
impl TransitionLogStore for FileCheckpointPagedLog
Source§fn supports_durable_flush(&self) -> bool
fn supports_durable_flush(&self) -> bool
Whether flush requests persistent storage. Custom/volatile logs default
to false; this describes an adapter, not the reliability of its hardware.
Source§fn read_log_entries(&mut self) -> Result<Vec<String>, LinkError>
fn read_log_entries(&mut self) -> Result<Vec<String>, LinkError>
Reads every entry back, oldest first.
Source§fn append_log_entry(&mut self, entry: &str) -> Result<(), LinkError>
fn append_log_entry(&mut self, entry: &str) -> Result<(), LinkError>
Appends one entry. Entries never contain newlines.
Source§fn supports_compaction(&self) -> bool
fn supports_compaction(&self) -> bool
Whether
compact_log_entries can rewrite
the durable journal. Retention uses it to bound the journal on disk;
logs without it keep every entry, as before.Source§fn compact_log_entries(&mut self, entries: &[String]) -> Result<(), LinkError>
fn compact_log_entries(&mut self, entries: &[String]) -> Result<(), LinkError>
Atomically and durably replaces every entry with
entries, the
retained journal. After a crash the log holds either the old or the
new journal, never a mixture. Called only between transactions and
only when supports_compaction is true.Auto Trait Implementations§
impl Freeze for FileCheckpointPagedLog
impl RefUnwindSafe for FileCheckpointPagedLog
impl Send for FileCheckpointPagedLog
impl Sync for FileCheckpointPagedLog
impl Unpin for FileCheckpointPagedLog
impl UnsafeUnpin for FileCheckpointPagedLog
impl UnwindSafe for FileCheckpointPagedLog
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