pub struct FileLogStore { /* private fields */ }Implementations§
Source§impl FileLogStore
impl FileLogStore
pub fn open( dir: impl Into<PathBuf>, cluster_id: impl Into<String>, epoch: u64, config_id: u64, ) -> Result<Self>
pub fn open_with_configuration( dir: impl Into<PathBuf>, cluster_id: impl Into<String>, epoch: u64, initial_configuration: ConfigurationState, ) -> Result<Self>
pub fn logical_state(&self) -> Result<LogState>
pub fn configuration_state(&self) -> Result<ConfigurationState>
pub fn install_recovery_anchor( &self, verified_anchor: &RecoveryAnchor, expected_recovery_generation: u64, expected_configuration: &ConfigurationState, ) -> Result<()>
Sourcepub fn append_batch_buffered(&self, entries: &[LogEntry]) -> Result<()>
pub fn append_batch_buffered(&self, entries: &[LogEntry]) -> Result<()>
Appends validated entries without issuing a data sync.
Call Self::sync before making the appended entries externally durable.
Trait Implementations§
Source§impl Debug for FileLogStore
impl Debug for FileLogStore
Source§impl LogStore for FileLogStore
impl LogStore for FileLogStore
fn append(&self, entry: &LogEntry) -> Result<()>
fn append_batch(&self, entries: &[LogEntry]) -> Result<()>
fn read(&self, index: LogIndex) -> Result<Option<LogEntry>>
fn read_range(&self, range: IndexRange) -> Result<Vec<LogEntry>>
fn last_index(&self) -> Result<Option<LogIndex>>
fn truncate_suffix(&self, from: LogIndex) -> Result<()>
fn compact_prefix( &self, verified_snapshot_anchor: &RecoveryAnchor, ) -> Result<()>
Auto Trait Implementations§
impl !Freeze for FileLogStore
impl RefUnwindSafe for FileLogStore
impl Send for FileLogStore
impl Sync for FileLogStore
impl Unpin for FileLogStore
impl UnsafeUnpin for FileLogStore
impl UnwindSafe for FileLogStore
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