Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Gets an integer value that indicates the update ___domain in which the role instance is running.
Namespace: Microsoft.WindowsAzure.ServiceRuntime
Assembly: Microsoft.WindowsAzure.ServiceRuntime (in Microsoft.WindowsAzure.ServiceRuntime.dll)
Syntax
public abstract int UpdateDomain { get; internal set; }
public:
property int UpdateDomain {
virtual int get() abstract;
internal: virtual void set(int value) abstract;
}
abstract UpdateDomain : int with get, internal set
Public MustOverride Property UpdateDomain As Integer
Get
Friend Set
End Property
Property Value
Type: System.Int32
Type: System.Int32
An integer value that represents the update ___domain in which the role instance is running.
Remarks
The update ___domain is related to the operation of upgrading a hosted service in the Azure Management Portal. When two or more role instances are running, they are assigned separate update domains (also referred to as an upgrade ___domain in the service model).
Azure upgrades one ___domain at a time, stopping the role instances running within the upgrade ___domain, upgrading them, bringing them back online, and moving on to the next ___domain. By stopping only the instances running within the current upgrade ___domain, Azure ensures that an upgrade takes place with the least possible impact to the running hosted service.
You can specify the number of upgrade domains to use in the ServiceDefinition.csdef file. The default number of upgrade domains is 5. For more information, see Azure Service Definition Schema
The following code example shows how to retrieve the upgrade ___domain in which role instances are running:
foreach (var role in RoleEnvironment.Roles)
{
foreach (var roleInstance in role.Value.Instances)
{
Trace.WriteLine("Role instance update ___domain: " + roleInstance.UpdateDomain, "Information");
}
}
See Also
RoleEnvironment
RoleInstance Class
Microsoft.WindowsAzure.ServiceRuntime Namespace
Return to top