@Target(value=METHOD)
@Retention(value=RUNTIME)
@Inherited
@Documented
public @interface Throttle
timeUnit可空,若为空则创建计数器节流器,否则创建时间节流器;
throttleName可空,若为空则使用类名#方法名作为节流器名称
| Modifier and Type | Required Element and Description |
|---|---|
long |
threshold |
| Modifier and Type | Optional Element and Description |
|---|---|
java.lang.String |
throttleName |
java.util.concurrent.TimeUnit[] |
timeUnit |