Class LoadBasedConfig
java.lang.Object
com.azure.resourcemanager.hdinsight.containers.models.LoadBasedConfig
- All Implemented Interfaces:
com.azure.json.JsonSerializable<LoadBasedConfig>
public final class LoadBasedConfig
extends Object
implements com.azure.json.JsonSerializable<LoadBasedConfig>
Profile of load based Autoscale.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the cooldownPeriod property: This is a cool down period, this is a time period in seconds, which determines the amount of time that must elapse between a scaling activity started by a rule and the start of the next scaling activity, regardless of the rule that triggers it.static LoadBasedConfigfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of LoadBasedConfig from the JsonReader.intmaxNodes()Get the maxNodes property: User needs to set the maximum number of nodes for load based scaling, the load based scaling will use this to scale up and scale down between minimum and maximum number of nodes.intminNodes()Get the minNodes property: User needs to set the minimum number of nodes for load based scaling, the load based scaling will use this to scale up and scale down between minimum and maximum number of nodes.Get the pollInterval property: User can specify the poll interval, this is the time period (in seconds) after which scaling metrics are polled for triggering a scaling operation.Get the scalingRules property: The scaling rules.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withCooldownPeriod(Integer cooldownPeriod) Set the cooldownPeriod property: This is a cool down period, this is a time period in seconds, which determines the amount of time that must elapse between a scaling activity started by a rule and the start of the next scaling activity, regardless of the rule that triggers it.withMaxNodes(int maxNodes) Set the maxNodes property: User needs to set the maximum number of nodes for load based scaling, the load based scaling will use this to scale up and scale down between minimum and maximum number of nodes.withMinNodes(int minNodes) Set the minNodes property: User needs to set the minimum number of nodes for load based scaling, the load based scaling will use this to scale up and scale down between minimum and maximum number of nodes.withPollInterval(Integer pollInterval) Set the pollInterval property: User can specify the poll interval, this is the time period (in seconds) after which scaling metrics are polled for triggering a scaling operation.withScalingRules(List<ScalingRule> scalingRules) Set the scalingRules property: The scaling rules.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
LoadBasedConfig
public LoadBasedConfig()Creates an instance of LoadBasedConfig class.
-
-
Method Details
-
minNodes
public int minNodes()Get the minNodes property: User needs to set the minimum number of nodes for load based scaling, the load based scaling will use this to scale up and scale down between minimum and maximum number of nodes.- Returns:
- the minNodes value.
-
withMinNodes
Set the minNodes property: User needs to set the minimum number of nodes for load based scaling, the load based scaling will use this to scale up and scale down between minimum and maximum number of nodes.- Parameters:
minNodes- the minNodes value to set.- Returns:
- the LoadBasedConfig object itself.
-
maxNodes
public int maxNodes()Get the maxNodes property: User needs to set the maximum number of nodes for load based scaling, the load based scaling will use this to scale up and scale down between minimum and maximum number of nodes.- Returns:
- the maxNodes value.
-
withMaxNodes
Set the maxNodes property: User needs to set the maximum number of nodes for load based scaling, the load based scaling will use this to scale up and scale down between minimum and maximum number of nodes.- Parameters:
maxNodes- the maxNodes value to set.- Returns:
- the LoadBasedConfig object itself.
-
pollInterval
Get the pollInterval property: User can specify the poll interval, this is the time period (in seconds) after which scaling metrics are polled for triggering a scaling operation.- Returns:
- the pollInterval value.
-
withPollInterval
Set the pollInterval property: User can specify the poll interval, this is the time period (in seconds) after which scaling metrics are polled for triggering a scaling operation.- Parameters:
pollInterval- the pollInterval value to set.- Returns:
- the LoadBasedConfig object itself.
-
cooldownPeriod
Get the cooldownPeriod property: This is a cool down period, this is a time period in seconds, which determines the amount of time that must elapse between a scaling activity started by a rule and the start of the next scaling activity, regardless of the rule that triggers it. The default value is 300 seconds.- Returns:
- the cooldownPeriod value.
-
withCooldownPeriod
Set the cooldownPeriod property: This is a cool down period, this is a time period in seconds, which determines the amount of time that must elapse between a scaling activity started by a rule and the start of the next scaling activity, regardless of the rule that triggers it. The default value is 300 seconds.- Parameters:
cooldownPeriod- the cooldownPeriod value to set.- Returns:
- the LoadBasedConfig object itself.
-
scalingRules
Get the scalingRules property: The scaling rules.- Returns:
- the scalingRules value.
-
withScalingRules
Set the scalingRules property: The scaling rules.- Parameters:
scalingRules- the scalingRules value to set.- Returns:
- the LoadBasedConfig object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<LoadBasedConfig>- Throws:
IOException
-
fromJson
Reads an instance of LoadBasedConfig from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of LoadBasedConfig if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IllegalStateException- If the deserialized JSON object was missing any required properties.IOException- If an error occurs while reading the LoadBasedConfig.
-