|
|
|
@ -59,11 +59,11 @@ public interface RRateLimiterReactive extends RExpirableReactive {
|
|
|
|
|
* @param mode rate mode
|
|
|
|
|
* @param rate rate
|
|
|
|
|
* @param rateInterval rate time interval
|
|
|
|
|
* @param timeToLive time interval before the object will be deleted
|
|
|
|
|
* @param keepAliveTime this is the maximum time that key will wait for new acquire before delete
|
|
|
|
|
* @return {@code true} if rate was set and {@code false}
|
|
|
|
|
* otherwise
|
|
|
|
|
*/
|
|
|
|
|
Mono<Boolean> trySetRate(RateType mode, long rate, Duration rateInterval, Duration timeToLive);
|
|
|
|
|
Mono<Boolean> trySetRate(RateType mode, long rate, Duration rateInterval, Duration keepAliveTime);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Use {@link #setRate(RateType, long, Duration)} instead.
|
|
|
|
@ -94,9 +94,9 @@ public interface RRateLimiterReactive extends RExpirableReactive {
|
|
|
|
|
* @param mode rate mode
|
|
|
|
|
* @param rate rate
|
|
|
|
|
* @param rateInterval rate time interval
|
|
|
|
|
* @param timeToLive time interval before the object will be deleted
|
|
|
|
|
* @param keepAliveTime this is the maximum time that key will wait for new acquire before delete
|
|
|
|
|
*/
|
|
|
|
|
Mono<Void> setRate(RateType mode, long rate, Duration rateInterval, Duration timeToLive);
|
|
|
|
|
Mono<Void> setRate(RateType mode, long rate, Duration rateInterval, Duration keepAliveTime);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Acquires a permit only if one is available at the
|
|
|
|
|