ServiceLoadMetricDescription Class
- java.
lang. Object - com.
azure. resourcemanager. servicefabric. models. ServiceLoadMetricDescription
- com.
Implements
public final class ServiceLoadMetricDescription
implements JsonSerializable<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 |
|
static
Service |
fromJson(JsonReader jsonReader)
Reads an instance of Service |
| String |
name()
Get the name property: The name of the metric. |
| Integer |
primaryDefaultLoad()
Get the primary |
| Integer |
secondaryDefaultLoad()
Get the secondary |
|
Json |
toJson(JsonWriter jsonWriter) |
| 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:
fromJson
public static ServiceLoadMetricDescription fromJson(JsonReader jsonReader)
Reads an instance of ServiceLoadMetricDescription from the JsonReader.
Parameters:
Returns:
Throws:
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:
toJson
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: