IStateProvider.GetCopyState(Int64, IOperationDataStream) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Obtains state on a primary replica that is required to build a secondary replica.
public System.Fabric.IOperationDataStream GetCopyState (long upToSequenceNumber, System.Fabric.IOperationDataStream copyContext);
abstract member GetCopyState : int64 * System.Fabric.IOperationDataStream -> System.Fabric.IOperationDataStream
Public Function GetCopyState (upToSequenceNumber As Long, copyContext As IOperationDataStream) As IOperationDataStream
Parameters
- upToSequenceNumber
- Int64
The maximum last sequence number 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
- IOperationDataStream
An IOperationDataStream that contains the OperationData objects that are created by the secondary replica.
Returns
Returns IOperationDataStream.
Remarks
Just as GetCopyContext() enables the secondary replica to send context to the primary replica via an IOperationDataStream, GetCopyState(Int64, IOperationDataStream) enables the primary replica to respond with an IOperationDataStream. The stream contains objects that are delivered to the secondary replica via the GetCopyStream() method of the FabricReplicator class. The objects implement IOperation and contain the specified data.
When the primary replica receives this call, it should create and return another IOperationDataStream that contains OperationData. OperationData represents the data/state that the secondary replica requires to catch up to the provided upToSequenceNumber
maximum LSN. How much and which state has to be sent can be determined via the context information that the secondary replica provides via GetCopyContext() method.
Applies to
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應