Class RedissonRateLimiterExt
java.lang.Object
org.redisson.RedissonObject
org.redisson.RedissonRateLimiter
io.github.devlibx.easy.ratelimit.redis.RedissonRateLimiterExt
- All Implemented Interfaces:
org.redisson.api.RExpirable,org.redisson.api.RExpirableAsync,org.redisson.api.RObject,org.redisson.api.RObjectAsync,org.redisson.api.RRateLimiter,org.redisson.api.RRateLimiterAsync
public class RedissonRateLimiterExt
extends org.redisson.RedissonRateLimiter
This class is extended to provide support to allow changign the rate limit in the rate limiter
-
Field Summary
Fields inherited from class org.redisson.RedissonObject
codec, commandExecutor, name -
Constructor Summary
ConstructorsConstructorDescriptionRedissonRateLimiterExt(org.redisson.command.CommandAsyncExecutor commandExecutor, String name) -
Method Summary
Modifier and TypeMethodDescriptionorg.redisson.api.RFuture<Void>acquireAsyncExtV3(long permits) voidacquireExtV3(long permits) booleanprotected org.redisson.api.RFuture<Boolean>clearExpireAsync(String... arg0) booleanprotected org.redisson.api.RFuture<Boolean>expireAsync(long arg0, TimeUnit arg1, String... arg2) booleanexpireAt(long arg0) booleanprotected org.redisson.api.RFuture<Boolean>expireAtAsync(long arg0, String... arg1) org.redisson.api.RFuture<Boolean>expireAtAsync(Date arg0) longorg.redisson.api.RFuture<Long>org.redisson.api.RFuture<Boolean>tryAcquireAsyncExtV3(long permits, long timeout, TimeUnit unit) org.redisson.api.RFuture<Boolean>trySetRateAsync(org.redisson.api.RateType type, long rate, long rateInterval, org.redisson.api.RateIntervalUnit unit) Methods inherited from class org.redisson.RedissonRateLimiter
acquire, acquire, acquireAsync, acquireAsync, availablePermits, availablePermitsAsync, clearExpireAsync, deleteAsync, expireAsync, expireAtAsync, getConfig, getConfigAsync, tryAcquire, tryAcquire, tryAcquire, tryAcquire, tryAcquireAsync, tryAcquireAsync, tryAcquireAsync, tryAcquireAsync, trySetRateMethods inherited from class org.redisson.RedissonObject
addListener, addListener, addListenerAsync, addListenerAsync, copy, copyAsync, delete, deleteAsync, dump, dumpAsync, encode, encode, encode, encode, encodeMapKey, encodeMapKeys, encodeMapValue, encodeMapValues, get, getCodec, getLockByMapKey, getLockByValue, getName, getName, isExists, isExistsAsync, migrate, migrateAsync, move, moveAsync, prefixName, removeListener, removeListenerAsync, removeListenersAsync, rename, renameAsync, renamenx, renamenxAsync, restore, restore, restoreAndReplace, restoreAndReplace, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, sizeInMemory, sizeInMemoryAsync, sizeInMemoryAsync, suffixName, toSeconds, toStream, touch, touchAsync, unlink, unlinkAsyncMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.redisson.api.RExpirable
clearExpire, expire, expireAt, expireAt, remainTimeToLiveMethods inherited from interface org.redisson.api.RExpirableAsync
expireAtAsync, remainTimeToLiveAsyncMethods inherited from interface org.redisson.api.RObject
addListener, copy, delete, dump, getCodec, getName, isExists, migrate, move, removeListener, rename, renamenx, restore, restore, restoreAndReplace, restoreAndReplace, sizeInMemory, touch, unlinkMethods inherited from interface org.redisson.api.RObjectAsync
addListenerAsync, copyAsync, dumpAsync, isExistsAsync, migrateAsync, moveAsync, removeListenerAsync, renameAsync, renamenxAsync, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, sizeInMemoryAsync, touchAsync, unlinkAsync
-
Constructor Details
-
RedissonRateLimiterExt
public RedissonRateLimiterExt(org.redisson.command.CommandAsyncExecutor commandExecutor, String name)
-
-
Method Details
-
trySetRateAsync
public org.redisson.api.RFuture<Boolean> trySetRateAsync(org.redisson.api.RateType type, long rate, long rateInterval, org.redisson.api.RateIntervalUnit unit) - Specified by:
trySetRateAsyncin interfaceorg.redisson.api.RRateLimiterAsync- Overrides:
trySetRateAsyncin classorg.redisson.RedissonRateLimiter
-
acquireExtV3
public void acquireExtV3(long permits) -
acquireAsyncExtV3
-
tryAcquireAsyncExtV3
-
expire
- Specified by:
expirein interfaceorg.redisson.api.RExpirable
-
expireAt
public boolean expireAt(long arg0) - Specified by:
expireAtin interfaceorg.redisson.api.RExpirable
-
expireAt
- Specified by:
expireAtin interfaceorg.redisson.api.RExpirable
-
expireAtAsync
- Specified by:
expireAtAsyncin interfaceorg.redisson.api.RExpirableAsync
-
clearExpire
public boolean clearExpire()- Specified by:
clearExpirein interfaceorg.redisson.api.RExpirable
-
remainTimeToLive
public long remainTimeToLive()- Specified by:
remainTimeToLivein interfaceorg.redisson.api.RExpirable
-
remainTimeToLiveAsync
- Specified by:
remainTimeToLiveAsyncin interfaceorg.redisson.api.RExpirableAsync
-
expireAsync
-
expireAtAsync
-
clearExpireAsync
-