Module bus.limiter

Annotation Interface Hotspot


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
    Modifier and Type
    Required Element
    Description
    int
    Specifies the threshold count for the hotspot rule.
    int
    Specifies the duration in seconds for which the hotspot rule is active after being triggered.
    Specifies the flow grade for the hotspot rule.
  • Element Details

    • grade

      FlowGrade grade
      Specifies the flow grade for the hotspot rule. This determines the type of metric used for limiting, e.g., QPS or thread count.
      Returns:
      The FlowGrade for the hotspot rule.
    • count

      int count
      Specifies 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 duration
      Specifies the duration in seconds for which the hotspot rule is active after being triggered.
      Returns:
      The duration in seconds for the hotspot rule.