Annotation Interface RedissonLock


@Target(METHOD) @Retention(RUNTIME) @Documented public @interface RedissonLock
分布式锁 基于redisson

支持定时任务

支持spEL的方式获取到参数作为key进行锁定

Since:
2023-08-24 15:08
Author:
xieyubin
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    cn.sinozg.applet.common.enums.LockGranularityType
    定时任务的时候,锁的粒度,即多久内执行一次,其他的都算重复
    为空,则锁方法,有值,锁对应的值,支持spEL表达式
    int
    锁多久后自动释放(单位:秒)
    boolean
    是否为定时任务
    int
    等待多久(单位:秒)
  • Element Details

    • key

      String key
      为空,则锁方法,有值,锁对应的值,支持spEL表达式
      Default:
      ""
    • waitTime

      int waitTime
      等待多久(单位:秒)
      Default:
      10
    • leaseTime

      int leaseTime
      锁多久后自动释放(单位:秒)
      Default:
      10
    • scheduled

      boolean scheduled
      是否为定时任务
      Default:
      false
    • granularity

      cn.sinozg.applet.common.enums.LockGranularityType granularity
      定时任务的时候,锁的粒度,即多久内执行一次,其他的都算重复
      Default:
      SECOND