pub trait Replicator:
Send
+ Sync
+ 'static
+ Send {
// Required methods
fn open(
&self,
cancellation_token: CancellationToken,
) -> impl Future<Output = Result<HSTRING>> + Send;
fn close(
&self,
cancellation_token: CancellationToken,
) -> impl Future<Output = Result<()>> + Send;
fn change_role(
&self,
epoch: &Epoch,
role: &ReplicaRole,
cancellation_token: CancellationToken,
) -> impl Future<Output = Result<()>> + Send;
fn update_epoch(
&self,
epoch: &Epoch,
cancellation_token: CancellationToken,
) -> impl Future<Output = Result<()>> + Send;
fn get_current_progress(&self) -> Result<i64>;
fn get_catch_up_capability(&self) -> Result<i64>;
fn abort(&self);
}
Expand description
TODO: replicator has no public documentation
Required Methods§
fn open( &self, cancellation_token: CancellationToken, ) -> impl Future<Output = Result<HSTRING>> + Send
fn close( &self, cancellation_token: CancellationToken, ) -> impl Future<Output = Result<()>> + Send
fn change_role( &self, epoch: &Epoch, role: &ReplicaRole, cancellation_token: CancellationToken, ) -> impl Future<Output = Result<()>> + Send
sourcefn update_epoch(
&self,
epoch: &Epoch,
cancellation_token: CancellationToken,
) -> impl Future<Output = Result<()>> + Send
fn update_epoch( &self, epoch: &Epoch, cancellation_token: CancellationToken, ) -> impl Future<Output = Result<()>> + Send
(TODO: This doc is from IStateProvider but not Replicator.) Indicates to a replica that the configuration of a replica set has changed due to a change or attempted change to the primary replica. The change occurs due to failure or load balancing of the previous primary replica. Epoch changes act as a barrier by segmenting operations into the exact configuration periods in which they were sent by a specific primary replica.
Called only on active secondary replicas. Primary replica gets new epoch via change_role call.
fn get_current_progress(&self) -> Result<i64>
fn get_catch_up_capability(&self) -> Result<i64>
fn abort(&self)
Object Safety§
This trait is not object safe.