pub struct ReplicatorProxy { /* private fields */ }
Trait Implementations§
Source§impl Replicator for ReplicatorProxy
impl Replicator for ReplicatorProxy
Source§async fn open(&self, cancellation_token: BoxedCancelToken) -> Result<WString>
async fn open(&self, cancellation_token: BoxedCancelToken) -> Result<WString>
Opens replicator, and returns the replicator address that is visible to primary
in ReplicaInformation.
Remarks:
Replicator does not have an assigned role yet and should setup listening endpoint.
async fn close(&self, cancellation_token: BoxedCancelToken) -> Result<()>
Source§async fn change_role(
&self,
epoch: &Epoch,
role: &ReplicaRole,
cancellation_token: BoxedCancelToken,
) -> Result<()>
async fn change_role( &self, epoch: &Epoch, role: &ReplicaRole, cancellation_token: BoxedCancelToken, ) -> Result<()>
Change the replicator role. Read more
Source§async fn update_epoch(
&self,
epoch: &Epoch,
cancellation_token: BoxedCancelToken,
) -> Result<()>
async fn update_epoch( &self, epoch: &Epoch, cancellation_token: BoxedCancelToken, ) -> Result<()>
(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. Read more
Source§fn get_current_progress(&self) -> Result<i64>
fn get_current_progress(&self) -> Result<i64>
Get the current LSN, end of log, called on secondaries.
SF uses this to do primary selection. It is also passed to update_catch_up_replica_set_configuration()
on primary. Primary uses this for catchup.
Source§fn get_catch_up_capability(&self) -> Result<i64>
fn get_catch_up_capability(&self) -> Result<i64>
Get the first LSN, beginning of log.
Remarks:
SF uses this to determine if other replicas can catch up from this replica.
Other replica’s end of log must be higher than this replica’s beginning of log
in order for the other replica to catchup, otherwise SF needs to drop the other
replica (if the current replica is chosen to be primary).
fn abort(&self)
Auto Trait Implementations§
impl Freeze for ReplicatorProxy
impl RefUnwindSafe for ReplicatorProxy
impl Send for ReplicatorProxy
impl Sync for ReplicatorProxy
impl Unpin for ReplicatorProxy
impl UnwindSafe for ReplicatorProxy
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<TraitVariantBlanketType> LocalReplicator for TraitVariantBlanketTypewhere
TraitVariantBlanketType: Replicator,
impl<TraitVariantBlanketType> LocalReplicator for TraitVariantBlanketTypewhere
TraitVariantBlanketType: Replicator,
Source§async fn open(
&self,
cancellation_token: Box<dyn CancelToken>,
) -> Result<WString, Error>
async fn open( &self, cancellation_token: Box<dyn CancelToken>, ) -> Result<WString, Error>
Opens replicator, and returns the replicator address that is visible to primary
in ReplicaInformation.
Remarks:
Replicator does not have an assigned role yet and should setup listening endpoint.
async fn close( &self, cancellation_token: Box<dyn CancelToken>, ) -> Result<(), Error>
Source§async fn change_role(
&self,
epoch: &Epoch,
role: &ReplicaRole,
cancellation_token: Box<dyn CancelToken>,
) -> Result<(), Error>
async fn change_role( &self, epoch: &Epoch, role: &ReplicaRole, cancellation_token: Box<dyn CancelToken>, ) -> Result<(), Error>
Change the replicator role. Read more
Source§async fn update_epoch(
&self,
epoch: &Epoch,
cancellation_token: Box<dyn CancelToken>,
) -> Result<(), Error>
async fn update_epoch( &self, epoch: &Epoch, cancellation_token: Box<dyn CancelToken>, ) -> Result<(), Error>
(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. Read more
Source§fn get_current_progress(&self) -> Result<i64, Error>
fn get_current_progress(&self) -> Result<i64, Error>
Get the current LSN, end of log, called on secondaries.
SF uses this to do primary selection. It is also passed to update_catch_up_replica_set_configuration()
on primary. Primary uses this for catchup.
Source§fn get_catch_up_capability(&self) -> Result<i64, Error>
fn get_catch_up_capability(&self) -> Result<i64, Error>
Get the first LSN, beginning of log.
Remarks:
SF uses this to determine if other replicas can catch up from this replica.
Other replica’s end of log must be higher than this replica’s beginning of log
in order for the other replica to catchup, otherwise SF needs to drop the other
replica (if the current replica is chosen to be primary).