StateReplicator.getReplicationStream 方法


Gets replication stream.

public OperationStream getReplicationStream()


The ReplicationStream implements OperationStream. The ReplicationStream contains OperationData objects that implement Operation. The objects are provided by the Primary replica via replicateAsync(OperationData operationData, SequenceNumber sequenceNumber, CancellationToken cancellationToken). Generally a Secondary replica should send getOperationAsync(CancellationToken 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 Operation method is null.