Package org.redisson.api
Interface RExpirableReactive
- All Superinterfaces:
RObjectReactive
- All Known Subinterfaces:
RAtomicDoubleReactive
,RAtomicLongReactive
,RBinaryStreamReactive
,RBitSetReactive
,RBlockingDequeReactive<V>
,RBlockingQueueReactive<V>
,RBucketReactive<V>
,RCollectionReactive<V>
,RDequeReactive<V>
,RGeoReactive<V>
,RHyperLogLogReactive<V>
,RIdGeneratorReactive
,RJsonBucketReactive<V>
,RLexSortedSetReactive
,RListMultimapCacheReactive<K,
,V> RListMultimapReactive<K,
,V> RListReactive<V>
,RLocalCachedMapReactive<K,
,V> RMapCacheReactive<K,
,V> RMapReactive<K,
,V> RMultimapReactive<K,
,V> RPermitExpirableSemaphoreReactive
,RQueueReactive<V>
,RRateLimiterReactive
,RReliableTopicReactive
,RRingBufferReactive<V>
,RScoredSortedSetReactive<V>
,RSemaphoreReactive
,RSetCacheReactive<V>
,RSetMultimapCacheReactive<K,
,V> RSetMultimapReactive<K,
,V> RSetReactive<V>
,RStreamReactive<K,
,V> RTimeSeriesReactive<V,
,L> RTransferQueueReactive<V>
Base interface for all Redisson objects
which support expiration or TTL
- Author:
- Nikita Koksharov
-
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono<Boolean>
Clear an expire timeout or expire date for object in mode.reactor.core.publisher.Mono<Boolean>
Deprecated.reactor.core.publisher.Mono<Boolean>
Sets a timeout for this object.reactor.core.publisher.Mono<Boolean>
Set an expire date for object.reactor.core.publisher.Mono<Boolean>
expireAt
(long timestamp) Deprecated.reactor.core.publisher.Mono<Boolean>
Deprecated.reactor.core.publisher.Mono<Boolean>
expireIfGreater
(Duration duration) Sets a timeout for this object only if it's greater than timeout set before.reactor.core.publisher.Mono<Boolean>
expireIfGreater
(Instant time) Sets an expiration date for this object only if it's greater than expiration date set before.reactor.core.publisher.Mono<Boolean>
expireIfLess
(Duration duration) Sets a timeout for this object only if it's less than timeout set before.reactor.core.publisher.Mono<Boolean>
expireIfLess
(Instant time) Sets an expiration date for this object only if it's less than expiration date set before.reactor.core.publisher.Mono<Boolean>
expireIfNotSet
(Duration duration) Sets a timeout for this object only if it hasn't been set before.reactor.core.publisher.Mono<Boolean>
expireIfNotSet
(Instant time) Sets an expiration date for this object only if it hasn't been set before.reactor.core.publisher.Mono<Boolean>
expireIfSet
(Duration duration) Sets a timeout for this object only if it has been already set.reactor.core.publisher.Mono<Boolean>
expireIfSet
(Instant time) Sets an expiration date for this object only if it has been already set.reactor.core.publisher.Mono<Long>
Expiration time of Redisson object that has a timeoutreactor.core.publisher.Mono<Long>
Get remaining time to live of object in milliseconds.Methods inherited from interface org.redisson.api.RObjectReactive
addListener, copy, delete, dump, getCodec, getIdleTime, getName, isExists, migrate, move, removeListener, rename, renamenx, restore, restore, restoreAndReplace, restoreAndReplace, sizeInMemory, touch, unlink
-
Method Details
-
expire
Deprecated.Useexpire(Duration)
instead- Parameters:
timeToLive
- - timeout before object will be deletedtimeUnit
- - timeout time unit- Returns:
true
if the timeout was set andfalse
if not
-
expireAt
Deprecated.Useexpire(Instant)
instead- Parameters:
timestamp
- - expire date- Returns:
true
if the timeout was set andfalse
if not
-
expireAt
Deprecated.Useexpire(Instant)
instead- Parameters:
timestamp
- - expire date in milliseconds (Unix timestamp)- Returns:
true
if the timeout was set andfalse
if not
-
expire
Set an expire date for object. When expire date comes the key will automatically be deleted.- Parameters:
instant
- - expire date- Returns:
true
if the timeout was set andfalse
if not
-
expireIfSet
Sets 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.
- Parameters:
time
- expire date- Returns:
true
if the timeout was set andfalse
if not
-
expireIfNotSet
Sets 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.
- Parameters:
time
- expire date- Returns:
true
if the timeout was set andfalse
if not
-
expireIfGreater
Sets 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.
- Parameters:
time
- expire date- Returns:
true
if the timeout was set andfalse
if not
-
expireIfLess
Sets 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.
- Parameters:
time
- expire date- Returns:
true
if the timeout was set andfalse
if not
-
expire
Sets a timeout for this object. After the timeout has expired, the key will automatically be deleted.- Parameters:
duration
- timeout before object will be deleted- Returns:
true
if the timeout was set andfalse
if not
-
expireIfSet
Sets 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.
- Parameters:
duration
- timeout before object will be deleted- Returns:
true
if the timeout was set andfalse
if not
-
expireIfNotSet
Sets 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.
- Parameters:
duration
- timeout before object will be deleted- Returns:
true
if the timeout was set andfalse
if not
-
expireIfGreater
Sets 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.
- Parameters:
duration
- timeout before object will be deleted- Returns:
true
if the timeout was set andfalse
if not
-
expireIfLess
Sets 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.
- Parameters:
duration
- timeout before object will be deleted- Returns:
true
if the timeout was set andfalse
if not
-
clearExpire
reactor.core.publisher.Mono<Boolean> clearExpire()Clear an expire timeout or expire date for object in mode. Object will not be deleted.- Returns:
true
if the timeout was cleared andfalse
if not
-
remainTimeToLive
reactor.core.publisher.Mono<Long> remainTimeToLive()Get remaining time to live of object in milliseconds.- Returns:
- time in milliseconds -2 if the key does not exist. -1 if the key exists but has no associated expire.
-
getExpireTime
reactor.core.publisher.Mono<Long> getExpireTime()Expiration time of Redisson object that has a timeoutRequires Redis 7.0.0 and higher.
- Returns:
- expiration time
-