Class RedisRatelimiter

java.lang.Object
org.aoju.bus.limiter.support.rate.RateLimiter
org.aoju.bus.limiter.support.rate.redis.RedisRatelimiter
All Implemented Interfaces:
Limiter<RateLimiter>

public class RedisRatelimiter extends RateLimiter
Since:
Java 17+
Version:
6.5.0
Author:
Kimi Liu
  • Constructor Details

    • RedisRatelimiter

      public RedisRatelimiter(String limiterName, org.redisson.config.Config config)
      Parameters:
      limiterName - 名称
      config - 配置
  • Method Details

    • acquire

      public boolean acquire(Object key, double rate, long capacity)
      Specified by:
      acquire in class RateLimiter
    • getLimiterName

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