Class RedisPeakLimiter

java.lang.Object
org.miaixz.bus.limiter.support.peak.PeakLimiter
org.miaixz.bus.limiter.support.peak.redis.RedisPeakLimiter
All Implemented Interfaces:
Limiter<Peak>

public class RedisPeakLimiter extends PeakLimiter
Since:
Java 17+
Author:
Kimi Liu
  • Constructor Details

    • RedisPeakLimiter

      public RedisPeakLimiter(org.redisson.Redisson redisson, String limiterName)
  • Method Details

    • acquire

      public boolean acquire(Object key, int max)
      Specified by:
      acquire in class PeakLimiter
    • release

      public void release(Object key, int max)
      Specified by:
      release in class PeakLimiter
    • getLimiterName

      public String getLimiterName()
      Description copied from interface: Limiter
      该限制器的名字 方便定位哪一个限制器被应用
      Returns:
      the string