|
|
|
@ -242,7 +242,7 @@ public class RedissonRateLimiter extends RedissonExpirable implements RRateLimit
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public RFuture<Boolean> trySetRateAsync(RateType type, long rate, long rateInterval, RateIntervalUnit unit) {
|
|
|
|
|
return commandExecutor.evalWriteAsync(getRawName(), LongCodec.INSTANCE, RedisCommands.EVAL_BOOLEAN,
|
|
|
|
|
return commandExecutor.evalWriteNoRetryAsync(getRawName(), LongCodec.INSTANCE, RedisCommands.EVAL_BOOLEAN,
|
|
|
|
|
"redis.call('hsetnx', KEYS[1], 'rate', ARGV[1]);"
|
|
|
|
|
+ "redis.call('hsetnx', KEYS[1], 'interval', ARGV[2]);"
|
|
|
|
|
+ "return redis.call('hsetnx', KEYS[1], 'type', ARGV[3]);",
|
|
|
|
|