Placement Prefer Primary Domain Policy Description Class
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.
Represents a ServicePlacementPolicyDescription which indicates that the service’s Primary replicas should optimally be placed in a particular domain.
public sealed class ServicePlacementPreferPrimaryDomainPolicyDescription : System.Fabric.Description.ServicePlacementPolicyDescription
type ServicePlacementPreferPrimaryDomainPolicyDescription = class inherit ServicePlacementPolicyDescription
Public NotInheritable Class ServicePlacementPreferPrimaryDomainPolicyDescription Inherits ServicePlacementPolicyDescription
//create the service placement policy ServicePlacementPreferPrimaryDomainPolicyDescription placementPolicy = new ServicePlacementPreferPrimaryDomainPolicyDescription(); placementPolicy.DomainName = @"fd:\Datacenter1"; //add it to the Stateful Service Description StatefulServiceDescription ssd = new StatefulServiceDescription(); ssd.PlacementPolicies.Add(placementPolicy);
This constraint is usually used with fault domains in scenarios where the Service Fabric cluster is geographically distributed in order to indicate that a service’s primary replica should be located in a particular fault domain, which in geo-distributed scenarios usually aligns with regional or datacenter boundaries. Note that since this is an optimization it is possible that the Primary replica may not end up located in this domain due to failures, capacity limits, or other constraints.
initializing a new instance of the ServicePlacementPreferPrimaryDomainPolicyDescription class.
Gets or sets the string name of the domain in which the Primary replica should be preferentially located.
Gets the service placement policy type.(Inherited from ServicePlacementPolicyDescription)
Return a string representation of the PreferPrimaryDomain Service Placement Policy in the form 'PreferPrimaryDomain, DomainName'