yangys
2024-05-08 dc40d10f7d8227d8b8216584ed19e4d41c57f0cd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package com.qianwen.core.redis.ratelimiter;
 
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import java.util.concurrent.TimeUnit;
 
@Target({ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface RateLimiter {
    String value();
 
    String param() default "";
 
    long max() default 100;
 
    long ttl() default 1;
 
    TimeUnit timeUnit() default TimeUnit.MINUTES;
}