共用方式為


ReplicatorSettings.LoadFrom Method

Definition

Loads the ReplicatorSettings object from the service configuration settings file.

public static System.Fabric.ReplicatorSettings LoadFrom (System.Fabric.CodePackageActivationContext codePackageActivationContext, string configPackageName, string sectionName);
static member LoadFrom : System.Fabric.CodePackageActivationContext * string * string -> System.Fabric.ReplicatorSettings
Public Shared Function LoadFrom (codePackageActivationContext As CodePackageActivationContext, configPackageName As String, sectionName As String) As ReplicatorSettings

Parameters

codePackageActivationContext
CodePackageActivationContext

The current code package activation context CodePackageActivationContext

configPackageName
String

The current configuration package name

sectionName
String

The section within the configuration file that defines all the replicator settings

Returns

The loaded ReplicatorSettings object from the service configuration settings file

Remarks

The configuration settings file (settings.xml) within the service configuration folder generally contains all the replicator settings that is needed to pass in the ReplicatorSettings object to the CreateReplicator(IStateProvider, ReplicatorSettings) method. Typically, the onus is on the service author to read the settings.xml file, parse the values and appropriately construct the ReplicatorSettings object.

With the current helper method, the service author can bypass the above process.

The following are the parameter names that should be provided in the service configuration “settings.xml”, to be recognizable by windows fabric to perform the above parsing automatically:

  1. BatchAcknowledgementInterval –BatchAcknowledgementInterval value in seconds

  2. InitialCopyQueueSize -InitialCopyQueueSize

  3. MaxCopyQueueSize -MaxCopyQueueSize

  4. MaxReplicationMessageSize -MaxReplicationMessageSize

  5. RetryInterval -RetryInterval value in seconds

  6. RequireServiceAck -RequireServiceAck

  7. ReplicatorAddress or ReplicatorEndpoint – ReplicatorAddress should be of the form IPort. ReplicatorEndpoint must reference a valid service endpoint resource from the service manifest -ReplicatorAddress

  8. ReplicatorListenAddress or ReplicatorEndpoint – ReplicatorListenAddress should be of the form IPort. ReplicatorEndpoint must reference a valid service endpoint resource from the service manifest -ReplicatorListenAddress

  9. ReplicatorPublishAddress or ReplicatorEndpoint – ReplicatorPublishAddress should be of the form IPort. ReplicatorEndpoint must reference a valid service endpoint resource from the service manifest -ReplicatorPublishAddress

  10. SecondaryClearAcknowledgedOperations -SecondaryClearAcknowledgedOperations

  11. PrimaryWaitForPendingQuorumsTimeout - PrimaryWaitForPendingQuorumsTimeout value in seconds

  12. UseStreamFaultsAndEndOfStreamOperationAck -UseStreamFaultsAndEndOfStreamOperationAck

  13. InitialPrimaryReplicationQueueSize -InitialPrimaryReplicationQueueSize

  14. InitialSecondaryReplicationQueueSize -InitialSecondaryReplicationQueueSize

  15. MaxPrimaryReplicationQueueSize -MaxPrimaryReplicationQueueSize

  16. MaxSecondaryReplicationQueueSize -MaxSecondaryReplicationQueueSize

  17. MaxPrimaryReplicationQueueMemorySize -MaxPrimaryReplicationQueueMemorySize

  18. MaxSecondaryReplicationQueueMemorySize -MaxSecondaryReplicationQueueMemorySize

Applies to