pub struct DatabaseStateMachine<F: DatabaseOperationHandler> { /* private fields */ }Expand description
A state machine that delegates operations to the actual database storage. This allows Raft to replicate real database operations.
Implementations§
Source§impl<F: DatabaseOperationHandler> DatabaseStateMachine<F>
impl<F: DatabaseOperationHandler> DatabaseStateMachine<F>
Trait Implementations§
Source§impl<F: DatabaseOperationHandler> StateMachineBackend for DatabaseStateMachine<F>
impl<F: DatabaseOperationHandler> StateMachineBackend for DatabaseStateMachine<F>
Source§fn apply(&self, command: &Command, index: u64) -> CommandResult
fn apply(&self, command: &Command, index: u64) -> CommandResult
Apply a command to the state machine at the given log index.
Source§fn last_applied(&self) -> u64
fn last_applied(&self) -> u64
Get the last applied log index.
Auto Trait Implementations§
impl<F> !Freeze for DatabaseStateMachine<F>
impl<F> RefUnwindSafe for DatabaseStateMachine<F>where
F: RefUnwindSafe,
impl<F> Send for DatabaseStateMachine<F>
impl<F> Sync for DatabaseStateMachine<F>
impl<F> Unpin for DatabaseStateMachine<F>where
F: Unpin,
impl<F> UnsafeUnpin for DatabaseStateMachine<F>where
F: UnsafeUnpin,
impl<F> UnwindSafe for DatabaseStateMachine<F>where
F: UnwindSafe,
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