pub struct StateReplicator { /* private fields */ }Expand description
State replicator for the primary node
Implementations§
Source§impl StateReplicator
impl StateReplicator
Sourcepub fn new(
config: ReplicatorConfig,
initial_integrity: StateIntegrity,
) -> (Self, ReplicatorHandle)
pub fn new( config: ReplicatorConfig, initial_integrity: StateIntegrity, ) -> (Self, ReplicatorHandle)
Create a new state replicator
Sourcepub async fn run(
self,
shutdown_rx: Receiver<bool>,
) -> Result<(), ReplicationError>
pub async fn run( self, shutdown_rx: Receiver<bool>, ) -> Result<(), ReplicationError>
Start the replicator (runs until shutdown)
Sourcepub fn next_fencing_token(&self) -> u64
pub fn next_fencing_token(&self) -> u64
Increment and return the fencing token
Auto Trait Implementations§
impl !Freeze for StateReplicator
impl !RefUnwindSafe for StateReplicator
impl Send for StateReplicator
impl Sync for StateReplicator
impl Unpin for StateReplicator
impl !UnwindSafe for StateReplicator
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