All Downloads are FREE. Search and download functionalities are using the official Maven repository.

in.hocg.boot.cache.autoconfiguration.annotation.RateLimit Maven / Gradle / Ivy

There is a newer version: 1.0.63
Show newest version
package in.hocg.boot.cache.autoconfiguration.annotation;

import java.lang.annotation.*;

/**
 * 自定义注解限流器
 *
 * @author hocgin
 */
@Inherited
@Documented
@Target({ElementType.METHOD, ElementType.FIELD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
public @interface RateLimit {

    /**
     * 限流唯一标示
     */
    String key() default "";

    /**
     * 限流时间 单位 s
     */
    long time() default 5;

    /**
     * 限流次数
     */
    long count() default 1;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy