ApplicationMetricDescription Class

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

Implements

public final class ApplicationMetricDescription
implements JsonSerializable<ApplicationMetricDescription>

Describes capacity information for a custom resource balancing metric. This can be used to limit the total consumption of this metric by the services of this application.

Constructor Summary

Constructor Description
ApplicationMetricDescription()

Creates an instance of ApplicationMetricDescription class.

Method Summary

Modifier and Type Method and Description
static ApplicationMetricDescription fromJson(JsonReader jsonReader)

Reads an instance of ApplicationMetricDescription from the JsonReader.

Long maximumCapacity()

Get the maximumCapacity property: The maximum node capacity for Service Fabric application.

String name()

Get the name property: The name of the metric.

Long reservationCapacity()

Get the reservationCapacity property: The node reservation capacity for Service Fabric application.

JsonWriter toJson(JsonWriter jsonWriter)
Long totalApplicationCapacity()

Get the totalApplicationCapacity property: The total metric capacity for Service Fabric application.

void validate()

Validates the instance.

ApplicationMetricDescription withMaximumCapacity(Long maximumCapacity)

Set the maximumCapacity property: The maximum node capacity for Service Fabric application.

ApplicationMetricDescription withName(String name)

Set the name property: The name of the metric.

ApplicationMetricDescription withReservationCapacity(Long reservationCapacity)

Set the reservationCapacity property: The node reservation capacity for Service Fabric application.

ApplicationMetricDescription withTotalApplicationCapacity(Long totalApplicationCapacity)

Set the totalApplicationCapacity property: The total metric capacity for Service Fabric application.

Methods inherited from java.lang.Object

Constructor Details

ApplicationMetricDescription

public ApplicationMetricDescription()

Creates an instance of ApplicationMetricDescription class.

Method Details

fromJson

public static ApplicationMetricDescription fromJson(JsonReader jsonReader)

Reads an instance of ApplicationMetricDescription from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of ApplicationMetricDescription if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If an error occurs while reading the ApplicationMetricDescription.

maximumCapacity

public Long maximumCapacity()

Get the maximumCapacity property: The maximum node capacity for Service Fabric application. This is the maximum Load for an instance of this application on a single node. Even if the capacity of node is greater than this value, Service Fabric will limit the total load of services within the application on each node to this value. If set to zero, capacity for this metric is unlimited on each node. When creating a new application with application capacity defined, the product of MaximumNodes and this value must always be smaller than or equal to TotalApplicationCapacity. When updating existing application with application capacity, the product of MaximumNodes and this value must always be smaller than or equal to TotalApplicationCapacity.

Returns:

the maximumCapacity value.

name

public String name()

Get the name property: The name of the metric.

Returns:

the name value.

reservationCapacity

public Long reservationCapacity()

Get the reservationCapacity property: The node reservation capacity for Service Fabric application. This is the amount of load which is reserved on nodes which have instances of this application. If MinimumNodes is specified, then the product of these values will be the capacity reserved in the cluster for the application. If set to zero, no capacity is reserved for this metric. When setting application capacity or when updating application capacity; this value must be smaller than or equal to MaximumCapacity for each metric.

Returns:

the reservationCapacity value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

totalApplicationCapacity

public Long totalApplicationCapacity()

Get the totalApplicationCapacity property: The total metric capacity for Service Fabric application. This is the total metric capacity for this application in the cluster. Service Fabric will try to limit the sum of loads of services within the application to this value. When creating a new application with application capacity defined, the product of MaximumNodes and MaximumCapacity must always be smaller than or equal to this value.

Returns:

the totalApplicationCapacity value.

validate

public void validate()

Validates the instance.

withMaximumCapacity

public ApplicationMetricDescription withMaximumCapacity(Long maximumCapacity)

Set the maximumCapacity property: The maximum node capacity for Service Fabric application. This is the maximum Load for an instance of this application on a single node. Even if the capacity of node is greater than this value, Service Fabric will limit the total load of services within the application on each node to this value. If set to zero, capacity for this metric is unlimited on each node. When creating a new application with application capacity defined, the product of MaximumNodes and this value must always be smaller than or equal to TotalApplicationCapacity. When updating existing application with application capacity, the product of MaximumNodes and this value must always be smaller than or equal to TotalApplicationCapacity.

Parameters:

maximumCapacity - the maximumCapacity value to set.

Returns:

the ApplicationMetricDescription object itself.

withName

public ApplicationMetricDescription withName(String name)

Set the name property: The name of the metric.

Parameters:

name - the name value to set.

Returns:

the ApplicationMetricDescription object itself.

withReservationCapacity

public ApplicationMetricDescription withReservationCapacity(Long reservationCapacity)

Set the reservationCapacity property: The node reservation capacity for Service Fabric application. This is the amount of load which is reserved on nodes which have instances of this application. If MinimumNodes is specified, then the product of these values will be the capacity reserved in the cluster for the application. If set to zero, no capacity is reserved for this metric. When setting application capacity or when updating application capacity; this value must be smaller than or equal to MaximumCapacity for each metric.

Parameters:

reservationCapacity - the reservationCapacity value to set.

Returns:

the ApplicationMetricDescription object itself.

withTotalApplicationCapacity

public ApplicationMetricDescription withTotalApplicationCapacity(Long totalApplicationCapacity)

Set the totalApplicationCapacity property: The total metric capacity for Service Fabric application. This is the total metric capacity for this application in the cluster. Service Fabric will try to limit the sum of loads of services within the application to this value. When creating a new application with application capacity defined, the product of MaximumNodes and MaximumCapacity must always be smaller than or equal to this value.

Parameters:

totalApplicationCapacity - the totalApplicationCapacity value to set.

Returns:

the ApplicationMetricDescription object itself.

Applies to