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
,RLexSortedSetReactive
,RListMultimapCacheReactive<K,V>
,RListMultimapReactive<K,V>
,RListReactive<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>
,RTransferQueueReactive<V>
public interface RExpirableReactive extends RObjectReactive
Base interface for all Redisson objects which support expiration or TTL- Author:
- Nikita Koksharov
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description reactor.core.publisher.Mono<Boolean>
clearExpire()
Clear an expire timeout or expire date for object in mode.reactor.core.publisher.Mono<Boolean>
expire(long timeToLive, TimeUnit timeUnit)
Set a timeout for object in mode.reactor.core.publisher.Mono<Boolean>
expireAt(long timestamp)
Deprecated.reactor.core.publisher.Mono<Boolean>
expireAt(Instant instant)
Set an expire date for object.reactor.core.publisher.Mono<Boolean>
expireAt(Date timestamp)
Deprecated.reactor.core.publisher.Mono<Long>
remainTimeToLive()
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 Detail
-
expire
reactor.core.publisher.Mono<Boolean> expire(long timeToLive, TimeUnit timeUnit)
Set a timeout for object in mode. After the timeout has expired, the key will automatically be deleted.- Parameters:
timeToLive
- - timeout before object will be deletedtimeUnit
- - timeout time unit- Returns:
true
if the timeout was set andfalse
if not
-
expireAt
@Deprecated reactor.core.publisher.Mono<Boolean> expireAt(Date timestamp)
Deprecated.UseexpireAt(Instant)
instead- Parameters:
timestamp
- - expire date- Returns:
true
if the timeout was set andfalse
if not
-
expireAt
@Deprecated reactor.core.publisher.Mono<Boolean> expireAt(long timestamp)
Deprecated.UseexpireAt(Instant)
instead- Parameters:
timestamp
- - expire date in milliseconds (Unix timestamp)- Returns:
true
if the timeout was set andfalse
if not
-
expireAt
reactor.core.publisher.Mono<Boolean> expireAt(Instant instant)
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
-
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.
-
-