You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
package com.glxp.api.annotation;
|
|
|
|
|
|
|
|
|
|
import javax.validation.constraints.Min;
|
|
|
|
|
import javax.validation.constraints.NotBlank;
|
|
|
|
|
import javax.validation.constraints.NotEmpty;
|
|
|
|
|
import java.lang.annotation.*;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* redisson分布式锁
|
|
|
|
|
*/
|
|
|
|
|
@Documented
|
|
|
|
|
@Retention(RetentionPolicy.RUNTIME)
|
|
|
|
|
@Target({ElementType.METHOD})
|
|
|
|
|
public @interface CusRedissonAnnotation {
|
|
|
|
|
|
|
|
|
|
@NotBlank(message = "redisson使用的缓存名称不能为空")
|
|
|
|
|
String cacheName();
|
|
|
|
|
|
|
|
|
|
@NotEmpty(message = "redisson使用的key不能为空")
|
|
|
|
|
String[] key();
|
|
|
|
|
|
|
|
|
|
@NotBlank(message = "redisson的超时信息不能为空")
|
|
|
|
|
String timeOutMsg();
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 等待锁的时间,默认1秒,小于0时默认为0
|
|
|
|
|
*
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@Min(value = 0, message = "等待时间最小值为0")
|
|
|
|
|
int waitTime() default 1;
|
|
|
|
|
}
|