Class ThrottlingPolicy

java.lang.Object
com.azure.resourcemanager.eventhubs.models.ApplicationGroupPolicy
com.azure.resourcemanager.eventhubs.models.ThrottlingPolicy
All Implemented Interfaces:
com.azure.json.JsonSerializable<ApplicationGroupPolicy>

public final class ThrottlingPolicy extends ApplicationGroupPolicy
Properties of the throttling policy.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an instance of ThrottlingPolicy class.
  • Method Summary

    Modifier and Type
    Method
    Description
    fromJson(com.azure.json.JsonReader jsonReader)
    Reads an instance of ThrottlingPolicy from the JsonReader.
    Get the metricId property: Metric Id on which the throttle limit should be set, MetricId can be discovered by hovering over Metric in the Metrics section of Event Hub Namespace inside Azure Portal.
    long
    Get the rateLimitThreshold property: The Threshold limit above which the application group will be throttled.Rate limit is always per second.
    com.azure.json.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)
    Get the type property: Application Group Policy types.
    void
    Validates the instance.
    Set the metricId property: Metric Id on which the throttle limit should be set, MetricId can be discovered by hovering over Metric in the Metrics section of Event Hub Namespace inside Azure Portal.
    Set the name property: The Name of this policy.
    withRateLimitThreshold(long rateLimitThreshold)
    Set the rateLimitThreshold property: The Threshold limit above which the application group will be throttled.Rate limit is always per second.

    Methods inherited from class com.azure.resourcemanager.eventhubs.models.ApplicationGroupPolicy

    name

    Methods inherited from class java.lang.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

    • ThrottlingPolicy

      public ThrottlingPolicy()
      Creates an instance of ThrottlingPolicy class.
  • Method Details

    • type

      Get the type property: Application Group Policy types.
      Overrides:
      type in class ApplicationGroupPolicy
      Returns:
      the type value.
    • rateLimitThreshold

      public long rateLimitThreshold()
      Get the rateLimitThreshold property: The Threshold limit above which the application group will be throttled.Rate limit is always per second.
      Returns:
      the rateLimitThreshold value.
    • withRateLimitThreshold

      public ThrottlingPolicy withRateLimitThreshold(long rateLimitThreshold)
      Set the rateLimitThreshold property: The Threshold limit above which the application group will be throttled.Rate limit is always per second.
      Parameters:
      rateLimitThreshold - the rateLimitThreshold value to set.
      Returns:
      the ThrottlingPolicy object itself.
    • metricId

      public MetricId metricId()
      Get the metricId property: Metric Id on which the throttle limit should be set, MetricId can be discovered by hovering over Metric in the Metrics section of Event Hub Namespace inside Azure Portal.
      Returns:
      the metricId value.
    • withMetricId

      public ThrottlingPolicy withMetricId(MetricId metricId)
      Set the metricId property: Metric Id on which the throttle limit should be set, MetricId can be discovered by hovering over Metric in the Metrics section of Event Hub Namespace inside Azure Portal.
      Parameters:
      metricId - the metricId value to set.
      Returns:
      the ThrottlingPolicy object itself.
    • withName

      public ThrottlingPolicy withName(String name)
      Set the name property: The Name of this policy.
      Overrides:
      withName in class ApplicationGroupPolicy
      Parameters:
      name - the name value to set.
      Returns:
      the ApplicationGroupPolicy object itself.
    • validate

      public void validate()
      Validates the instance.
      Overrides:
      validate in class ApplicationGroupPolicy
      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<ApplicationGroupPolicy>
      Overrides:
      toJson in class ApplicationGroupPolicy
      Throws:
      IOException
    • fromJson

      public static ThrottlingPolicy fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of ThrottlingPolicy from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of ThrottlingPolicy 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 ThrottlingPolicy.