pub struct StateMachineStore<S = RedbStore> { /* private fields */ }Implementations§
Source§impl<S: Storage> StateMachineStore<S>
impl<S: Storage> StateMachineStore<S>
Trait Implementations§
Source§impl<S> Clone for StateMachineStore<S>
impl<S> Clone for StateMachineStore<S>
Source§impl<S: Storage> RaftStateMachine<TypeConfig> for StateMachineStore<S>
impl<S: Storage> RaftStateMachine<TypeConfig> for StateMachineStore<S>
Source§type SnapshotBuilder = SnapshotBuilder<S>
type SnapshotBuilder = SnapshotBuilder<S>
Snapshot builder type.
Source§async fn applied_state(
&mut self,
) -> Result<(Option<LogId<NodeId>>, StoredMembership<NodeId, BasicNode>), StorageError<NodeId>>
async fn applied_state( &mut self, ) -> Result<(Option<LogId<NodeId>>, StoredMembership<NodeId, BasicNode>), StorageError<NodeId>>
Returns the last applied log id which is recorded in state machine, and the last applied
membership config. Read more
Source§async fn apply<I>(
&mut self,
entries: I,
) -> Result<Vec<AppResponse>, StorageError<NodeId>>
async fn apply<I>( &mut self, entries: I, ) -> Result<Vec<AppResponse>, StorageError<NodeId>>
Apply the given payload of entries to the state machine. Read more
Source§async fn get_snapshot_builder(&mut self) -> Self::SnapshotBuilder
async fn get_snapshot_builder(&mut self) -> Self::SnapshotBuilder
Get the snapshot builder for the state machine. Read more
Source§async fn begin_receiving_snapshot(
&mut self,
) -> Result<Box<Cursor<Vec<u8>>>, StorageError<NodeId>>
async fn begin_receiving_snapshot( &mut self, ) -> Result<Box<Cursor<Vec<u8>>>, StorageError<NodeId>>
Create a new blank snapshot, returning a writable handle to the snapshot object. Read more
Source§async fn install_snapshot(
&mut self,
meta: &SnapshotMeta<NodeId, BasicNode>,
snapshot: Box<Cursor<Vec<u8>>>,
) -> Result<(), StorageError<NodeId>>
async fn install_snapshot( &mut self, meta: &SnapshotMeta<NodeId, BasicNode>, snapshot: Box<Cursor<Vec<u8>>>, ) -> Result<(), StorageError<NodeId>>
Install a snapshot which has finished streaming from the leader. Read more
Source§async fn get_current_snapshot(
&mut self,
) -> Result<Option<Snapshot<TypeConfig>>, StorageError<NodeId>>
async fn get_current_snapshot( &mut self, ) -> Result<Option<Snapshot<TypeConfig>>, StorageError<NodeId>>
Get a readable handle to the current snapshot. Read more
Auto Trait Implementations§
impl<S> Freeze for StateMachineStore<S>
impl<S> RefUnwindSafe for StateMachineStore<S>where
S: RefUnwindSafe,
impl<S> Send for StateMachineStore<S>
impl<S> Sync for StateMachineStore<S>
impl<S> Unpin for StateMachineStore<S>
impl<S> UnsafeUnpin for StateMachineStore<S>
impl<S> UnwindSafe for StateMachineStore<S>where
S: RefUnwindSafe,
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