ServiceLoadMetricDescription Class

  • java.lang.Object
    • com.azure.resourcemanager.servicefabric.models.ServiceLoadMetricDescription

public final class ServiceLoadMetricDescription

Specifies a metric to load balance a service during runtime.

Constructor Summary

Constructor Description
ServiceLoadMetricDescription()

Creates an instance of ServiceLoadMetricDescription class.

Method Summary

Modifier and Type Method and Description
Integer defaultLoad()

Get the defaultLoad property: Used only for Stateless services.

String name()

Get the name property: The name of the metric.

Integer primaryDefaultLoad()

Get the primaryDefaultLoad property: Used only for Stateful services.

Integer secondaryDefaultLoad()

Get the secondaryDefaultLoad property: Used only for Stateful services.

void validate()

Validates the instance.

ServiceLoadMetricWeight weight()

Get the weight property: The service load metric relative weight, compared to other metrics configured for this service, as a number.

ServiceLoadMetricDescription withDefaultLoad(Integer defaultLoad)

Set the defaultLoad property: Used only for Stateless services.

ServiceLoadMetricDescription withName(String name)

Set the name property: The name of the metric.

ServiceLoadMetricDescription withPrimaryDefaultLoad(Integer primaryDefaultLoad)

Set the primaryDefaultLoad property: Used only for Stateful services.

ServiceLoadMetricDescription withSecondaryDefaultLoad(Integer secondaryDefaultLoad)

Set the secondaryDefaultLoad property: Used only for Stateful services.

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.

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:

the defaultLoad value.

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:

the name value.

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:

the primaryDefaultLoad value.

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:

the secondaryDefaultLoad value.

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:

the weight value.

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:

defaultLoad - the defaultLoad value to set.

Returns:

the ServiceLoadMetricDescription object itself.

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:

name - the name value to set.

Returns:

the ServiceLoadMetricDescription object itself.

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:

primaryDefaultLoad - the primaryDefaultLoad value to set.

Returns:

the ServiceLoadMetricDescription object itself.

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:

secondaryDefaultLoad - the secondaryDefaultLoad value to set.

Returns:

the ServiceLoadMetricDescription object itself.

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:

weight - the weight value to set.

Returns:

the ServiceLoadMetricDescription object itself.

Applies to