- All Implemented Interfaces:
Serializable,Comparable<StrategyMode>,Constable
Enumeration representing different strategy modes for the limiter. These modes define how limiting rules are applied
and what actions are taken when limits are exceeded.
- Since:
- Java 17+
- Author:
- Kimi Liu
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionRepresents a fallback strategy, typically used for graceful degradation when a service is overloaded.Represents a hotspot method strategy, focusing on limiting access to frequently accessed methods or resources.Represents a request limiting strategy, controlling the rate of incoming requests. -
Method Summary
Modifier and TypeMethodDescriptionstatic StrategyModeReturns the enum constant of this class with the specified name.static StrategyMode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
FALLBACK
Represents a fallback strategy, typically used for graceful degradation when a service is overloaded. -
HOT_METHOD
Represents a hotspot method strategy, focusing on limiting access to frequently accessed methods or resources. -
REQUEST_LIMIT
Represents a request limiting strategy, controlling the rate of incoming requests.
-
-
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
-