com.github.yaowenbin.idempotent.Idempotent Maven / Gradle / Ivy
package com.github.yaowenbin.idempotent;
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;
/**
* @Author yaowenbin
* @Date 2023/6/20
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface Idempotent {
String valExpression() default "token";
int interval() default 1000;
TimeUnit unit() default TimeUnit.MILLISECONDS;
}