ServiceLoadMetricDescription Class
- java.
lang. Object - com.
azure. resourcemanager. servicefabric. models. ServiceLoadMetricDescription
- com.
public final class ServiceLoadMetricDescription
Specifies a metric to load balance a service during runtime.
Constructor Summary
Constructor | Description |
---|---|
ServiceLoadMetricDescription() |
Creates an instance of Service |
Method Summary
Modifier and Type | Method and Description |
---|---|
Integer |
defaultLoad()
Get the default |
String |
name()
Get the name property: The name of the metric. |
Integer |
primaryDefaultLoad()
Get the primary |
Integer |
secondaryDefaultLoad()
Get the secondary |
void |
validate()
Validates the instance. |
Service |
weight()
Get the weight property: The service load metric relative weight, compared to other metrics configured for this service, as a number. |
Service |
withDefaultLoad(Integer defaultLoad)
Set the default |
Service |
withName(String name)
Set the name property: The name of the metric. |
Service |
withPrimaryDefaultLoad(Integer primaryDefaultLoad)
Set the primary |
Service |
withSecondaryDefaultLoad(Integer secondaryDefaultLoad)
Set the secondary |
Service |
withWeight(ServiceLoadMetricWeight weight)
Set the weight property: The service load metric relative weight, compared to other metrics configured for this service, as a number. |
Methods inherited from java.lang.Object
Constructor Details
ServiceLoadMetricDescription
public ServiceLoadMetricDescription()
Creates an instance of ServiceLoadMetricDescription class.
Method Details
defaultLoad
public Integer defaultLoad()
Get the defaultLoad property: Used only for Stateless services. The default amount of load, as a number, that this service creates for this metric.
Returns:
name
public String name()
Get the name property: The name of the metric. If the service chooses to report load during runtime, the load metric name should match the name that is specified in Name exactly. Note that metric names are case sensitive.
Returns:
primaryDefaultLoad
public Integer primaryDefaultLoad()
Get the primaryDefaultLoad property: Used only for Stateful services. The default amount of load, as a number, that this service creates for this metric when it is a Primary replica.
Returns:
secondaryDefaultLoad
public Integer secondaryDefaultLoad()
Get the secondaryDefaultLoad property: Used only for Stateful services. The default amount of load, as a number, that this service creates for this metric when it is a Secondary replica.
Returns:
validate
public void validate()
Validates the instance.
weight
public ServiceLoadMetricWeight weight()
Get the weight property: The service load metric relative weight, compared to other metrics configured for this service, as a number.
Returns:
withDefaultLoad
public ServiceLoadMetricDescription withDefaultLoad(Integer defaultLoad)
Set the defaultLoad property: Used only for Stateless services. The default amount of load, as a number, that this service creates for this metric.
Parameters:
Returns:
withName
public ServiceLoadMetricDescription withName(String name)
Set the name property: The name of the metric. If the service chooses to report load during runtime, the load metric name should match the name that is specified in Name exactly. Note that metric names are case sensitive.
Parameters:
Returns:
withPrimaryDefaultLoad
public ServiceLoadMetricDescription withPrimaryDefaultLoad(Integer primaryDefaultLoad)
Set the primaryDefaultLoad property: Used only for Stateful services. The default amount of load, as a number, that this service creates for this metric when it is a Primary replica.
Parameters:
Returns:
withSecondaryDefaultLoad
public ServiceLoadMetricDescription withSecondaryDefaultLoad(Integer secondaryDefaultLoad)
Set the secondaryDefaultLoad property: Used only for Stateful services. The default amount of load, as a number, that this service creates for this metric when it is a Secondary replica.
Parameters:
Returns:
withWeight
public ServiceLoadMetricDescription withWeight(ServiceLoadMetricWeight weight)
Set the weight property: The service load metric relative weight, compared to other metrics configured for this service, as a number.
Parameters:
Returns:
Applies to
Azure SDK for Java
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for