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
    Constructor
    Description
    Creates an instance of LoadBasedConfig class.
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of LoadBasedConfig from the JsonReader.
    int
    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.
    int
    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.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)
    void
    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.
    Set the scalingRules property: The scaling rules.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods 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

      public LoadBasedConfig 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.
      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

      public LoadBasedConfig 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.
      Parameters:
      maxNodes - the maxNodes value to set.
      Returns:
      the LoadBasedConfig object itself.
    • pollInterval

      public Integer 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

      public LoadBasedConfig 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.
      Parameters:
      pollInterval - the pollInterval value to set.
      Returns:
      the LoadBasedConfig object itself.
    • cooldownPeriod

      public Integer 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

      public LoadBasedConfig 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. The default value is 300 seconds.
      Parameters:
      cooldownPeriod - the cooldownPeriod value to set.
      Returns:
      the LoadBasedConfig object itself.
    • scalingRules

      public List<ScalingRule> scalingRules()
      Get the scalingRules property: The scaling rules.
      Returns:
      the scalingRules value.
    • withScalingRules

      public LoadBasedConfig withScalingRules(List<ScalingRule> scalingRules)
      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

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<LoadBasedConfig>
      Throws:
      IOException
    • fromJson

      public static LoadBasedConfig fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      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.