Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

RoleInstanceStatus Enumeration

Updated: October 18, 2011

Indicates the status of a role instance.

Namespace: Microsoft.WindowsAzure.ServiceRuntime
Assembly: Microsoft.WindowsAzure.ServiceRuntime (in Microsoft.WindowsAzure.ServiceRuntime.dll)

public enum class RoleInstanceStatus

Member nameDescription
BusyIndicates that the role instance is unavailable for requests.
ReadyIndicates that the role instance is ready to accept requests.

The RoleInstanceStatus object is returned in the Status property of the RoleInstanceStatusCheckEventArgs class.

If the status of a role instance is Ready, it is prepared to receive requests from the load balancer. If the status of a role instance is Busy, it will not receive requests from the load balancer.

The following code example shows how to check the status of the role instance:


public override bool OnStart()
{
   RoleEnvironment.StatusCheck += RoleEnvironmentStatusCheck;
      
   return base.OnStart();
}
   
private void RoleEnvironmentStatusCheck(object sender, RoleInstanceStatusCheckEventArgs e)
{
   Trace.WriteLine("The status of the role instance:" + e.Status, "Information");
}

Development Platforms

Windows Vista, Windows 7, Windows Server 2008, Windows 8.1, Windows Server 2012 R2, Windows 8 and Windows Server 2012

Target Platforms

Community Additions

ADD
Show:
© 2015 Microsoft