共用方式為


KeyValueStoreReplica.OnReplicationOperation Method

Definition

Called by the system on secondary replicas for incoming replication operations. Each KeyValueStoreNotification object contains all the data for a single atomic replication operation.

protected virtual void OnReplicationOperation (System.Collections.Generic.IEnumerator<System.Fabric.KeyValueStoreNotification> enumerator);
abstract member OnReplicationOperation : System.Collections.Generic.IEnumerator<System.Fabric.KeyValueStoreNotification> -> unit
override this.OnReplicationOperation : System.Collections.Generic.IEnumerator<System.Fabric.KeyValueStoreNotification> -> unit
Protected Overridable Sub OnReplicationOperation (enumerator As IEnumerator(Of KeyValueStoreNotification))

Parameters

enumerator
IEnumerator<KeyValueStoreNotification>

The enumerator used to read the data in this replication operation.

Remarks

This method will only be called on secondary replicas if the KeyValueStoreReplica object was constructed with a valid KeyValueStoreReplica.SecondaryNotificationMode.

If the BlockSecondaryAck mode was specified, then the incoming replication operation is not applied locally on the secondary replica and acknowledged to the primary until the method returns. This implies that the application must take care to return from this method in a timely manner to avoiding blocking the replication stream. Since the acknowledgment is not sent to the primary until this method returns, it cannot be assumed that the observed replication operation has already been (or is guaranteed to be in the future) applied by a quorum of replicas in the replica set.

If the NonBlockingQuorumAcked mode was specified, then the observed replication operation is guaranteed to have already been applied by a quorum of replicas in the replica set. Furthermore, the observed replication operation may have already been applied locally by this secondary and acknowledged to the primary at the time the method is invoked by the system. The method callback will not block the replication stream in this mode, but it will still block the replication operation notification stream. That is, there will only be one outstanding OnReplicationOperation method callback at any given time.

Applies to