Package org.redisson
Class RedissonPermitExpirableSemaphore
java.lang.Object
org.redisson.RedissonObject
org.redisson.RedissonPermitExpirableSemaphore
- All Implemented Interfaces:
RExpirable,RExpirableAsync,RObject,RObjectAsync,RPermitExpirableSemaphore,RPermitExpirableSemaphoreAsync
public class RedissonPermitExpirableSemaphore
extends RedissonObject
implements RPermitExpirableSemaphore
- Author:
- Nikita Koksharov
-
Field Summary
Fields inherited from class org.redisson.RedissonObject
codec, name -
Constructor Summary
ConstructorsConstructorDescriptionRedissonPermitExpirableSemaphore(CommandAsyncExecutor commandExecutor, String name) -
Method Summary
Modifier and TypeMethodDescriptionacquire()Acquires a permit and returns its id.Acquires a permit with definedleaseTimeand return its id.Acquires a permit and returns its id.acquireAsync(long leaseTime, TimeUnit timeUnit) Acquires a permit with definedleaseTimeand return its id.voidaddPermits(int permits) Increases or decreases the number of available permits by defined value.addPermitsAsync(int permits) Increases or decreases the number of available permits by defined value.intReturns amount of available permits.Returns amount of available permits.booleanClear an expire timeout or expire date for object.Clear an expire timeout or expire date for object in async mode.clearExpireAsync(String... keys) Delete object in async modebooleanUseRExpirable.expire(Duration)insteadbooleanSets a timeout for this object.booleanSets an expiration date for this object.expireAsync(long timeToLive, TimeUnit timeUnit) UseRExpirableAsync.expireAsync(Duration)insteadexpireAsync(long timeToLive, TimeUnit timeUnit, String param, String... keys) expireAsync(Duration duration) Set a timeout for object.expireAsync(Instant instant) Set an expire date for object.booleanexpireAt(long timestamp) UseRExpirable.expire(Instant)insteadbooleanUseRExpirable.expire(Instant)insteadexpireAtAsync(long timestamp) UseRExpirableAsync.expireAsync(Instant)insteadexpireAtAsync(long timestamp, String param, String... keys) expireAtAsync(Date timestamp) UseRExpirableAsync.expireAsync(Instant)insteadbooleanexpireIfGreater(Duration duration) Sets a timeout for this object only if it's greater than timeout set before.booleanexpireIfGreater(Instant time) Sets an expiration date for this object only if it's greater than expiration date set before.expireIfGreaterAsync(Duration duration) Sets a timeout for this object only if it's greater than timeout set before.expireIfGreaterAsync(Instant time) Sets an expiration date for this object only if it's greater than expiration date set before.booleanexpireIfLess(Duration duration) Sets a timeout for this object only if it's less than timeout set before.booleanexpireIfLess(Instant time) Sets an expiration date for this object only if it's less than expiration date set before.expireIfLessAsync(Duration duration) Sets a timeout for this object only if it's less than timeout set before.expireIfLessAsync(Instant time) Sets an expiration date for this object only if it's less than expiration date set before.booleanexpireIfNotSet(Duration duration) Sets a timeout for this object only if it hasn't been set before.booleanexpireIfNotSet(Instant time) Sets an expiration date for this object only if it hasn't been set before.expireIfNotSetAsync(Duration duration) Sets a timeout for this object only if it hasn't been set before.expireIfNotSetAsync(Instant time) Sets an expiration date for this object only if it hasn't been set before.booleanexpireIfSet(Duration duration) Sets a timeout for this object only if it has been already set.booleanexpireIfSet(Instant time) Sets an expiration date for this object only if it has been already set.expireIfSetAsync(Duration duration) Sets a timeout for this object only if it has been already set.expireIfSetAsync(Instant time) Sets an expiration date for this object only if it has been already set.protected byte[]static StringgetChannelName(String name) longExpiration time of Redisson object that has a timeoutExpiration time of Redisson object that has a timeoutvoidReleases a permit by its id.releaseAsync(String permitId) Releases a permit by its id.longRemaining time to live of Redisson object that has a timeoutRemaining time to live of Redisson object that has a timeoutReturns bytes amount used by object in Redis memory.Tries to acquire currently available permit and return its id.tryAcquire(long waitTime, long ttl, TimeUnit unit) Tries to acquire currently available permit with definedleaseTimeand return its id.tryAcquire(long waitTime, TimeUnit unit) Tries to acquire currently available permit and return its id.Tries to acquire currently available permit and return its id.tryAcquireAsync(long waitTime, long ttl, TimeUnit unit) Tries to acquire currently available permit with definedleaseTimeand return its id.tryAcquireAsync(long waitTime, TimeUnit unit) Tries to acquire currently available permit and return its id.booleantryRelease(String permitId) Tries to release permit by its id.tryReleaseAsync(String permitId) Tries to release permit by its id.booleantrySetPermits(int permits) Tries to set number of permits.trySetPermitsAsync(int permits) Tries to set number of permits.booleanupdateLeaseTime(String permitId, long leaseTime, TimeUnit unit) Overrides and updates lease time for defined permit id.updateLeaseTimeAsync(String permitId, long leaseTime, TimeUnit unit) Overrides and updates lease time for defined permit id.Methods inherited from class org.redisson.RedissonObject
addListener, addListener, addListenerAsync, addListenerAsync, copy, copyAsync, delete, deleteAsync, dump, dumpAsync, encode, encode, encode, encode, encodeMapKey, encodeMapKey, encodeMapKeys, encodeMapValue, encodeMapValues, get, getCodec, getIdleTime, getIdleTimeAsync, getLockByMapKey, getLockByValue, getName, getRawName, getRawName, isExists, isExistsAsync, migrate, migrateAsync, move, moveAsync, prefixName, removeListener, removeListenerAsync, rename, renameAsync, renamenx, renamenxAsync, restore, restore, restoreAndReplace, restoreAndReplace, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, setName, 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, expire, expire, expireAt, expireAt, expireIfGreater, expireIfGreater, expireIfLess, expireIfLess, expireIfNotSet, expireIfNotSet, expireIfSet, expireIfSet, getExpireTime, remainTimeToLiveMethods inherited from interface org.redisson.api.RExpirableAsync
expireAsync, expireAsync, expireAsync, expireAtAsync, expireAtAsync, expireIfGreaterAsync, expireIfGreaterAsync, expireIfLessAsync, expireIfLessAsync, expireIfNotSetAsync, expireIfNotSetAsync, expireIfSetAsync, expireIfSetAsync, getExpireTimeAsync, remainTimeToLiveAsyncMethods inherited from interface org.redisson.api.RObject
addListener, copy, delete, dump, getCodec, getIdleTime, getName, isExists, migrate, move, removeListener, rename, renamenx, restore, restore, restoreAndReplace, restoreAndReplace, sizeInMemory, touch, unlinkMethods inherited from interface org.redisson.api.RObjectAsync
addListenerAsync, copyAsync, dumpAsync, getIdleTimeAsync, isExistsAsync, migrateAsync, moveAsync, removeListenerAsync, renameAsync, renamenxAsync, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, touchAsync, unlinkAsync
-
Constructor Details
-
RedissonPermitExpirableSemaphore
-
-
Method Details
-
getChannelName
-
acquire
Description copied from interface:RPermitExpirableSemaphoreAcquires a permit and returns its id. Waits if necessary until a permit became available.- Specified by:
acquirein interfaceRPermitExpirableSemaphore- Returns:
- permit id
- Throws:
InterruptedException- if the current thread is interrupted
-
acquire
Description copied from interface:RPermitExpirableSemaphoreAcquires a permit with definedleaseTimeand return its id. Waits if necessary until a permit became available.- Specified by:
acquirein interfaceRPermitExpirableSemaphore- Parameters:
leaseTime- permit lease timetimeUnit- time unit- Returns:
- permit id
- Throws:
InterruptedException- if the current thread is interrupted
-
acquireAsync
Description copied from interface:RPermitExpirableSemaphoreAsyncAcquires a permit with definedleaseTimeand return its id. Waits if necessary until a permit became available.- Specified by:
acquireAsyncin interfaceRPermitExpirableSemaphoreAsync- Parameters:
leaseTime- permit lease timetimeUnit- time unit- Returns:
- permit id
-
acquireAsync
Description copied from interface:RPermitExpirableSemaphoreAsyncAcquires a permit and returns its id. Waits if necessary until a permit became available.- Specified by:
acquireAsyncin interfaceRPermitExpirableSemaphoreAsync- Returns:
- permit id
-
tryAcquire
Description copied from interface:RPermitExpirableSemaphoreTries to acquire currently available permit and return its id.- Specified by:
tryAcquirein interfaceRPermitExpirableSemaphore- Returns:
- permit id if a permit was acquired and
nullotherwise
-
tryAcquireAsync
Description copied from interface:RPermitExpirableSemaphoreAsyncTries to acquire currently available permit and return its id.- Specified by:
tryAcquireAsyncin interfaceRPermitExpirableSemaphoreAsync- Returns:
- permit id if a permit was acquired and
nullotherwise
-
generateId
protected byte[] generateId() -
tryAcquireAsync
Description copied from interface:RPermitExpirableSemaphoreAsyncTries to acquire currently available permit and return its id. Waits up to definedwaitTimeif necessary until a permit became available.- Specified by:
tryAcquireAsyncin interfaceRPermitExpirableSemaphoreAsync- Parameters:
waitTime- the maximum time to waitunit- the time unit- Returns:
- permit id if a permit was acquired and
nullif the waiting time elapsed before a permit was acquired
-
tryAcquire
Description copied from interface:RPermitExpirableSemaphoreTries to acquire currently available permit with definedleaseTimeand return its id. Waits up to definedwaitTimeif necessary until a permit became available.- Specified by:
tryAcquirein interfaceRPermitExpirableSemaphore- Parameters:
waitTime- the maximum time to waitttl- permit lease time, use -1 to make it permanentunit- the time unit- Returns:
- permit id if a permit was acquired and
nullif the waiting time elapsed before a permit was acquired - Throws:
InterruptedException- if the current thread is interrupted
-
tryAcquireAsync
Description copied from interface:RPermitExpirableSemaphoreAsyncTries to acquire currently available permit with definedleaseTimeand return its id. Waits up to definedwaitTimeif necessary until a permit became available.- Specified by:
tryAcquireAsyncin interfaceRPermitExpirableSemaphoreAsync- Parameters:
waitTime- the maximum time to waitttl- permit lease time, use -1 to make it permanentunit- the time unit- Returns:
- permit id if a permit was acquired and
nullif the waiting time elapsed before a permit was acquired
-
tryAcquire
Description copied from interface:RPermitExpirableSemaphoreTries to acquire currently available permit and return its id. Waits up to definedwaitTimeif necessary until a permit became available.- Specified by:
tryAcquirein interfaceRPermitExpirableSemaphore- Parameters:
waitTime- the maximum time to waitunit- the time unit- Returns:
- permit id if a permit was acquired and
nullif the waiting time elapsed before a permit was acquired - Throws:
InterruptedException- if the current thread is interrupted
-
release
Description copied from interface:RPermitExpirableSemaphoreReleases a permit by its id. Increases the number of available permits. Throws an exception if permit id doesn't exist or has already been released.- Specified by:
releasein interfaceRPermitExpirableSemaphore- Parameters:
permitId- - permit id
-
tryRelease
Description copied from interface:RPermitExpirableSemaphoreTries to release permit by its id.- Specified by:
tryReleasein interfaceRPermitExpirableSemaphore- Parameters:
permitId- permit id- Returns:
trueif a permit has been released andfalseotherwise
-
tryReleaseAsync
Description copied from interface:RPermitExpirableSemaphoreAsyncTries to release permit by its id.- Specified by:
tryReleaseAsyncin interfaceRPermitExpirableSemaphoreAsync- Parameters:
permitId- permit id- Returns:
trueif a permit has been released andfalseotherwise
-
sizeInMemoryAsync
Description copied from interface:RObjectAsyncReturns bytes amount used by object in Redis memory.- Specified by:
sizeInMemoryAsyncin interfaceRObjectAsync- Overrides:
sizeInMemoryAsyncin classRedissonObject- Returns:
- size in bytes
-
deleteAsync
Description copied from interface:RObjectAsyncDelete object in async mode- Specified by:
deleteAsyncin interfaceRObjectAsync- Overrides:
deleteAsyncin classRedissonObject- Returns:
trueif object was deletedfalseif not
-
expireAsync
-
expireAtAsync
-
clearExpireAsync
Description copied from interface:RExpirableAsyncClear an expire timeout or expire date for object in async mode. Object will not be deleted.- Specified by:
clearExpireAsyncin interfaceRExpirableAsync- Returns:
trueif the timeout was cleared andfalseif not
-
releaseAsync
Description copied from interface:RPermitExpirableSemaphoreAsyncReleases a permit by its id. Increases the number of available permits. Throws an exception if permit id doesn't exist or has already been released.- Specified by:
releaseAsyncin interfaceRPermitExpirableSemaphoreAsync- Parameters:
permitId- - permit id- Returns:
- void
-
availablePermits
public int availablePermits()Description copied from interface:RPermitExpirableSemaphoreReturns amount of available permits.- Specified by:
availablePermitsin interfaceRPermitExpirableSemaphore- Returns:
- number of permits
-
availablePermitsAsync
Description copied from interface:RPermitExpirableSemaphoreAsyncReturns amount of available permits.- Specified by:
availablePermitsAsyncin interfaceRPermitExpirableSemaphoreAsync- Returns:
- number of permits
-
trySetPermits
public boolean trySetPermits(int permits) Description copied from interface:RPermitExpirableSemaphoreTries to set number of permits.- Specified by:
trySetPermitsin interfaceRPermitExpirableSemaphore- Parameters:
permits- - number of permits- Returns:
trueif permits has been set successfully, otherwisefalse.
-
trySetPermitsAsync
Description copied from interface:RPermitExpirableSemaphoreAsyncTries to set number of permits.- Specified by:
trySetPermitsAsyncin interfaceRPermitExpirableSemaphoreAsync- Parameters:
permits- - number of permits- Returns:
trueif permits has been set successfully, otherwisefalse.
-
addPermits
public void addPermits(int permits) Description copied from interface:RPermitExpirableSemaphoreIncreases or decreases the number of available permits by defined value.- Specified by:
addPermitsin interfaceRPermitExpirableSemaphore- Parameters:
permits- amount of permits to add/remove
-
addPermitsAsync
Description copied from interface:RPermitExpirableSemaphoreAsyncIncreases or decreases the number of available permits by defined value.- Specified by:
addPermitsAsyncin interfaceRPermitExpirableSemaphoreAsync- Parameters:
permits- amount of permits to add/remove- Returns:
- void
-
updateLeaseTimeAsync
Description copied from interface:RPermitExpirableSemaphoreAsyncOverrides and updates lease time for defined permit id.- Specified by:
updateLeaseTimeAsyncin interfaceRPermitExpirableSemaphoreAsync- Parameters:
permitId- permit idleaseTime- permit lease time, use -1 to make it permanentunit- the time unit- Returns:
trueif permits has been updated successfully, otherwisefalse.
-
updateLeaseTime
Description copied from interface:RPermitExpirableSemaphoreOverrides and updates lease time for defined permit id.- Specified by:
updateLeaseTimein interfaceRPermitExpirableSemaphore- Parameters:
permitId- permit idleaseTime- permit lease time, use -1 to make it permanentunit- the time unit- Returns:
trueif permits has been updated successfully, otherwisefalse.
-
expire
Description copied from interface:RExpirableUseRExpirable.expire(Duration)instead- Specified by:
expirein interfaceRExpirable- Parameters:
timeToLive- - timeout before object will be deletedtimeUnit- - timeout time unit- Returns:
trueif the timeout was set andfalseif not
-
expireAsync
Description copied from interface:RExpirableAsyncUseRExpirableAsync.expireAsync(Duration)instead- Specified by:
expireAsyncin interfaceRExpirableAsync- Parameters:
timeToLive- - timeout before object will be deletedtimeUnit- - timeout time unit- Returns:
trueif the timeout was set andfalseif not
-
expireAt
public boolean expireAt(long timestamp) Description copied from interface:RExpirableUseRExpirable.expire(Instant)instead- Specified by:
expireAtin interfaceRExpirable- Parameters:
timestamp- - expire date in milliseconds (Unix timestamp)- Returns:
trueif the timeout was set andfalseif not
-
expireAtAsync
Description copied from interface:RExpirableAsyncUseRExpirableAsync.expireAsync(Instant)instead- Specified by:
expireAtAsyncin interfaceRExpirableAsync- Parameters:
timestamp- - expire date in milliseconds (Unix timestamp)- Returns:
trueif the timeout was set andfalseif not
-
expire
Description copied from interface:RExpirableSets an expiration date for this object. When expire date comes the key will automatically be deleted.- Specified by:
expirein interfaceRExpirable- Parameters:
instant- expire date- Returns:
trueif the timeout was set andfalseif not
-
expireIfSet
Description copied from interface:RExpirableSets an expiration date for this object only if it has been already set. When expire date comes the object will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfSetin interfaceRExpirable- Parameters:
time- expire date- Returns:
trueif the timeout was set andfalseif not
-
expireIfSetAsync
Description copied from interface:RExpirableAsyncSets an expiration date for this object only if it has been already set. When expire date comes the object will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfSetAsyncin interfaceRExpirableAsync- Parameters:
time- expire date- Returns:
trueif the timeout was set andfalseif not
-
expireIfNotSet
Description copied from interface:RExpirableSets an expiration date for this object only if it hasn't been set before. When expire date comes the object will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfNotSetin interfaceRExpirable- Parameters:
time- expire date- Returns:
trueif the timeout was set andfalseif not
-
expireIfNotSetAsync
Description copied from interface:RExpirableAsyncSets an expiration date for this object only if it hasn't been set before. When expire date comes the object will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfNotSetAsyncin interfaceRExpirableAsync- Parameters:
time- expire date- Returns:
trueif the timeout was set andfalseif not
-
expireIfGreater
Description copied from interface:RExpirableSets an expiration date for this object only if it's greater than expiration date set before. When expire date comes the object will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfGreaterin interfaceRExpirable- Parameters:
time- expire date- Returns:
trueif the timeout was set andfalseif not
-
expireIfGreaterAsync
Description copied from interface:RExpirableAsyncSets an expiration date for this object only if it's greater than expiration date set before. When expire date comes the object will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfGreaterAsyncin interfaceRExpirableAsync- Parameters:
time- expire date- Returns:
trueif the timeout was set andfalseif not
-
expireIfLess
Description copied from interface:RExpirableSets an expiration date for this object only if it's less than expiration date set before. When expire date comes the object will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfLessin interfaceRExpirable- Parameters:
time- expire date- Returns:
trueif the timeout was set andfalseif not
-
expireIfLessAsync
Description copied from interface:RExpirableAsyncSets an expiration date for this object only if it's less than expiration date set before. When expire date comes the object will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfLessAsyncin interfaceRExpirableAsync- Parameters:
time- expire date- Returns:
trueif the timeout was set andfalseif not
-
expireAsync
Description copied from interface:RExpirableAsyncSet an expire date for object. When expire date comes the key will automatically be deleted.- Specified by:
expireAsyncin interfaceRExpirableAsync- Parameters:
instant- - expire date- Returns:
trueif the timeout was set andfalseif not
-
expire
Description copied from interface:RExpirableSets a timeout for this object. After the timeout has expired, the key will automatically be deleted.- Specified by:
expirein interfaceRExpirable- Parameters:
duration- timeout before object will be deleted- Returns:
trueif the timeout was set andfalseif not
-
expireAsync
Description copied from interface:RExpirableAsyncSet a timeout for object. After the timeout has expired, the key will automatically be deleted.- Specified by:
expireAsyncin interfaceRExpirableAsync- Parameters:
duration- timeout before object will be deleted- Returns:
trueif the timeout was set andfalseif not
-
expireAt
Description copied from interface:RExpirableUseRExpirable.expire(Instant)instead- Specified by:
expireAtin interfaceRExpirable- Parameters:
timestamp- - expire date- Returns:
trueif the timeout was set andfalseif not
-
expireAtAsync
Description copied from interface:RExpirableAsyncUseRExpirableAsync.expireAsync(Instant)instead- Specified by:
expireAtAsyncin interfaceRExpirableAsync- Parameters:
timestamp- - expire date- Returns:
trueif the timeout was set andfalseif not
-
expireIfSet
Description copied from interface:RExpirableSets a timeout for this object only if it has been already set. After the timeout has expired, the key will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfSetin interfaceRExpirable- Parameters:
duration- timeout before object will be deleted- Returns:
trueif the timeout was set andfalseif not
-
expireIfSetAsync
Description copied from interface:RExpirableAsyncSets a timeout for this object only if it has been already set. After the timeout has expired, the key will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfSetAsyncin interfaceRExpirableAsync- Parameters:
duration- timeout before object will be deleted- Returns:
trueif the timeout was set andfalseif not
-
expireIfNotSet
Description copied from interface:RExpirableSets a timeout for this object only if it hasn't been set before. After the timeout has expired, the key will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfNotSetin interfaceRExpirable- Parameters:
duration- timeout before object will be deleted- Returns:
trueif the timeout was set andfalseif not
-
expireIfNotSetAsync
Description copied from interface:RExpirableAsyncSets a timeout for this object only if it hasn't been set before. After the timeout has expired, the key will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfNotSetAsyncin interfaceRExpirableAsync- Parameters:
duration- timeout before object will be deleted- Returns:
trueif the timeout was set andfalseif not
-
expireIfGreater
Description copied from interface:RExpirableSets a timeout for this object only if it's greater than timeout set before. After the timeout has expired, the key will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfGreaterin interfaceRExpirable- Parameters:
duration- timeout before object will be deleted- Returns:
trueif the timeout was set andfalseif not
-
expireIfGreaterAsync
Description copied from interface:RExpirableAsyncSets a timeout for this object only if it's greater than timeout set before. After the timeout has expired, the key will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfGreaterAsyncin interfaceRExpirableAsync- Parameters:
duration- timeout before object will be deleted- Returns:
trueif the timeout was set andfalseif not
-
expireIfLess
Description copied from interface:RExpirableSets a timeout for this object only if it's less than timeout set before. After the timeout has expired, the key will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfLessin interfaceRExpirable- Parameters:
duration- timeout before object will be deleted- Returns:
trueif the timeout was set andfalseif not
-
expireIfLessAsync
Description copied from interface:RExpirableAsyncSets a timeout for this object only if it's less than timeout set before. After the timeout has expired, the key will automatically be deleted.Requires Redis 7.0.0 and higher.
- Specified by:
expireIfLessAsyncin interfaceRExpirableAsync- Parameters:
duration- timeout before object will be deleted- Returns:
trueif the timeout was set andfalseif not
-
clearExpire
public boolean clearExpire()Description copied from interface:RExpirableClear an expire timeout or expire date for object.- Specified by:
clearExpirein interfaceRExpirable- Returns:
trueif timeout was removedfalseif object does not exist or does not have an associated timeout
-
remainTimeToLive
public long remainTimeToLive()Description copied from interface:RExpirableRemaining time to live of Redisson object that has a timeout- Specified by:
remainTimeToLivein interfaceRExpirable- Returns:
- time in milliseconds -2 if the key does not exist. -1 if the key exists but has no associated expire.
-
remainTimeToLiveAsync
Description copied from interface:RExpirableAsyncRemaining time to live of Redisson object that has a timeout- Specified by:
remainTimeToLiveAsyncin interfaceRExpirableAsync- Returns:
- time in milliseconds -2 if the key does not exist. -1 if the key exists but has no associated expire.
-
getExpireTime
public long getExpireTime()Description copied from interface:RExpirableExpiration time of Redisson object that has a timeoutRequires Redis 7.0.0 and higher.
- Specified by:
getExpireTimein interfaceRExpirable- Returns:
- expiration time
-
getExpireTimeAsync
Description copied from interface:RExpirableAsyncExpiration time of Redisson object that has a timeoutRequires Redis 7.0.0 and higher.
- Specified by:
getExpireTimeAsyncin interfaceRExpirableAsync- Returns:
- expiration time
-
clearExpireAsync
-