StateProvider.getCopyState(SequenceNumber upToSequenceNumber, OperationDataStream copyContext) 方法

定义

Obtains state on a Primary replica that is required to build a Secondary replica.

Remarks:Just as getCopyContext() enables the Secondary replica to send context to the Primary replica via an OperationDataStream, getCopyState(SequenceNumber upToSequenceNumber, OperationDataStream copyContext) enables the Primary replica to respond with an OperationDataStream. The stream contains objects that are delivered to the Secondary replica via the getCopyStream() method of the FabricReplicator class. The objects implement Operation and contain the specified data. When the Primary replica receives this call, it should create and return another OperationDataStream that contains OperationData. OperationData represents the data/state that the Secondary replica

public OperationDataStream getCopyState(SequenceNumber upToSequenceNumber, OperationDataStream copyContext)

参数

upToSequenceNumber
SequenceNumber

The maximum last sequence number (LSN) that should be placed in the copy stream via the getCopyStream() method. LSNs greater than this number are delivered to the Secondary replica as a part of the replication stream via the getReplicationStream() method.

copyContext
OperationDataStream

An OperationDataStream that contains the OperationData objects that are created by the Secondary replica. requires to catch up to the provided

返回

适用于