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>
Properties of the throttling policy.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ThrottlingPolicyfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of ThrottlingPolicy from the JsonReader.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.longGet the rateLimitThreshold property: The Threshold limit above which the application group will be throttled.Rate limit is always per second.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) type()Get the type property: Application Group Policy types.voidvalidate()Validates the instance.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.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
nameMethods inherited from class java.lang.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
-
ThrottlingPolicy
public ThrottlingPolicy()Creates an instance of ThrottlingPolicy class.
-
-
Method Details
-
type
Get the type property: Application Group Policy types.- Overrides:
typein classApplicationGroupPolicy- 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
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
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
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
Set the name property: The Name of this policy.- Overrides:
withNamein classApplicationGroupPolicy- Parameters:
name- the name value to set.- Returns:
- the ApplicationGroupPolicy object itself.
-
validate
public void validate()Validates the instance.- Overrides:
validatein classApplicationGroupPolicy- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<ApplicationGroupPolicy>- Overrides:
toJsonin classApplicationGroupPolicy- Throws:
IOException
-
fromJson
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.
-