public class RedisRatelimiter extends RateLimiter
| Modifier and Type | Class and Description |
|---|---|
static class |
RedisRatelimiter.RateLimiterRedission
继承自Redisson 实现自定义api
|
| Constructor and Description |
|---|
RedisRatelimiter(String limiterName,
org.redisson.config.Config config) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
acquire(Object key,
double rate,
long capacity) |
String |
getLimiterName()
该限制器的名字 方便定位哪一个限制器被应用
|
limit, releasepublic RedisRatelimiter(String limiterName, org.redisson.config.Config config)
limiterName - 名称config - 配置public boolean acquire(Object key, double rate, long capacity)
acquire in class RateLimiterCopyright © 2020. All rights reserved.