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

com.battcn.boot.request.configuration.redis.lock.RedisLock Maven / Gradle / Ivy

package com.battcn.boot.request.configuration.redis.lock;

import java.lang.annotation.*;
import java.util.concurrent.TimeUnit;

/**
 * @author Levin
 */
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Inherited
public @interface RedisLock {

    /**
     * redis 锁key的前缀
     *
     * @return redis 锁key的前缀
     */
    String prefix() default "";

    /**
     * 过期秒数,默认为5秒
     *
     * @return 轮询锁的时间
     */
    int expire() default 5;

    /**
     * 超时时间单位
     *
     * @return 秒
     */
    TimeUnit timeUnit() default TimeUnit.SECONDS;

    /**
     * 

Key的分隔符(默认 :)

*

生成的Key:N:SO1008:500

* * @return String */ String delimiter() default ":"; /** * 提示消息 * * @return String */ String message() default ""; }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy