Annotation Interface RedissonLock


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

支持定时任务

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

从以下版本开始:
2023-08-24 15:08
作者:
xieyubin
  • 可选元素概要

    可选元素
    修饰符和类型
    可选元素
    说明
    cn.sinozg.applet.common.enums.LockGranularityType
    定时任务的时候,锁的粒度,即多久内执行一次,其他的都算重复
    为空,则锁方法,有值,锁对应的值,支持spEL表达式
    int
    锁多久后自动释放(单位:秒)
    boolean
    是否为定时任务
    int
    等待多久(单位:秒)
  • 元素详细资料

    • key

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

      int waitTime
      等待多久(单位:秒)
      默认值:
      10
    • leaseTime

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

      boolean scheduled
      是否为定时任务
      默认值:
      false
    • granularity

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