Annotation for marking methods that require hotspot protection. This annotation is used to apply flow control rules
to frequently accessed methods or resources, preventing them from being overloaded.
- Since:
- Java 17+
- Author:
- Kimi Liu
-
Required Element Summary
Required Elements
-
Element Details
-
grade
FlowGrade gradeSpecifies the flow grade for the hotspot rule. This determines the type of metric used for limiting, e.g., QPS or thread count.- Returns:
- The
FlowGradefor the hotspot rule.
-
count
int countSpecifies the threshold count for the hotspot rule. When the resource usage exceeds this count, the hotspot protection mechanism is triggered.- Returns:
- The count threshold for the hotspot rule.
-
duration
int durationSpecifies the duration in seconds for which the hotspot rule is active after being triggered.- Returns:
- The duration in seconds for the hotspot rule.
-