다음을 통해 공유


IStateProvider.GetCopyContext Method

Definition

Obtains context on a secondary replica after it is created and opened to send context to the primary replica.

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

Returns

Returns IOperationDataStream.

Remarks

The primary replica analyzes the context and sends back state via GetCopyState(Int64, IOperationDataStream).

GetCopyContext() is called on newly created, idle secondary replicas and provides a mechanism to asynchronously establish a bidirectional conversation with the primary replica. The secondary replica sends OperationData objects with which the primary replica can determine the progress of collecting context on the secondary replica. The primary replica responds by sending the required state back. See GetCopyState(Int64, IOperationDataStream) at the primary replica for the other half of the exchange.

For in-memory services, the GetCopyContext() method is not called, as the state of the secondary replicas is known (they are empty and will require all of the state).

Applies to