Share via


IStateReplicator.GetReplicationStream Method

Definition

Gets replication stream.

public System.Fabric.IOperationStream GetReplicationStream ();
abstract member GetReplicationStream : unit -> System.Fabric.IOperationStream
Public Function GetReplicationStream () As IOperationStream

Returns

Returns the replication IOperationStream.

Exceptions

FabricTransientException is a retriable exception. It is caused by one of the following;

ReconfigurationPending is returned when the replicator has a pending reconfiguration.

FabricObjectClosedException is caused by one of the following;

ObjectClosed is returned when the replicator has been closed.

Remarks

The ReplicationStream implements IOperationStream. The ReplicationStream contains OperationData objects that implement IOperation. The objects are provided by the Primary replica via ReplicateAsync(OperationData, CancellationToken, Int64). Generally a Secondary replica should send GetOperationAsync(CancellationToken). Although Service Fabric does not require services to do so, generally services should transfer all OperationData objects out of the copy stream first, and then transfer operations out of the replication stream. The transfer from both copies in parallel is supported but increases the complexity of applying state updates correctly and is recommended only for advanced services. The stream is empty when the returned IOperation method is null.

Applies to