Commit d632c8f
feat: add SmartOrder annotation for intelligent RateLimit prioritization (#1016)
* feat: add SmartOrder annotation for intelligent RateLimit prioritization
This feature introduces a new SmartOrder annotation that enables intelligent
prioritization of multiple RateLimit annotations on the same method.
Key changes:
- Added SmartOrder annotation class for marking methods that need smart ordering
- Modified RateLimitAspect to support priority-based RateLimit processing
- RateLimits are now processed in order of strictness (maxAttempts/decay ratio)
- More restrictive rate limits are evaluated first for better efficiency
The SmartOrder annotation allows developers to optimize rate limiting behavior
by ensuring stricter limits are checked before more lenient ones.
* feat: replace SmartOrder annotation with AutoSort for improved rate limit prioritization
* Update README.md
Co-Authored-By: copilot-swe-agent[bot] <[email protected]>
Co-Authored-By: huangdijia <[email protected]>
* feat: 添加中文文档以支持限流组件的使用说明
---------
Co-authored-by: Deeka Wong <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>1 parent 5f4f2ec commit d632c8f
File tree
4 files changed
+578
-1
lines changed- src/rate-limit
- src
- Annotation
- Aspect
4 files changed
+578
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
30 | 34 | | |
31 | 35 | | |
32 | 36 | | |
| |||
39 | 43 | | |
40 | 44 | | |
41 | 45 | | |
42 | | - | |
| 46 | + | |
43 | 47 | | |
44 | 48 | | |
45 | 49 | | |
| |||
142 | 146 | | |
143 | 147 | | |
144 | 148 | | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
145 | 192 | | |
146 | 193 | | |
147 | 194 | | |
| |||
400 | 447 | | |
401 | 448 | | |
402 | 449 | | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
403 | 472 | | |
404 | 473 | | |
405 | 474 | | |
0 commit comments