Enum Class ConcurrencyLimit.ThrottlePolicy
java.lang.Object
java.lang.Enum<ConcurrencyLimit.ThrottlePolicy>
org.springframework.resilience.annotation.ConcurrencyLimit.ThrottlePolicy
- All Implemented Interfaces:
Serializable, Comparable<ConcurrencyLimit.ThrottlePolicy>, Constable
- Enclosing class:
ConcurrencyLimit
Policy to apply for throttling method invocations when the limit has been reached.
- Since:
- 7.0.3
- Author:
- Juergen Hoeller, Hyunsang Han, Sam Brannen
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionReturns the enum constant of this class with the specified name.static ConcurrencyLimit.ThrottlePolicy[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
BLOCK
The default: block until we can invoke the method within the configured limit. -
REJECT
Alternative: reject further method invocations once the limit has been reached.- See Also:
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-