VolatileActorStateProvider.IStateProvider.GetCopyState Method

Definition

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

System.Fabric.IOperationDataStream IStateProvider.GetCopyState (long upToSequenceNumber, System.Fabric.IOperationDataStream copyContext);
abstract member System.Fabric.IStateProvider.GetCopyState : int64 * System.Fabric.IOperationDataStream -> System.Fabric.IOperationDataStream
override this.System.Fabric.IStateProvider.GetCopyState : int64 * System.Fabric.IOperationDataStream -> System.Fabric.IOperationDataStream
Function GetCopyState (upToSequenceNumber As Long, copyContext As IOperationDataStream) As IOperationDataStream Implements IStateProvider.GetCopyState

Parameters

upToSequenceNumber
Int64

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
IOperationDataStream

An IOperationDataStream that contains the OperationData objects that are created by the Secondary replica.

Returns

Returns IOperationDataStream.

Implements

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