Package org.redisson.api
Interface RExpirableReactive
-
- All Superinterfaces:
RObjectReactive
- All Known Subinterfaces:
RAtomicDoubleReactive
,RAtomicLongReactive
,RBitSetReactive
,RBlockingDequeReactive<V>
,RBlockingQueueReactive<V>
,RBucketReactive<V>
,RCollectionReactive<V>
,RDequeReactive<V>
,RGeoReactive<V>
,RHyperLogLogReactive<V>
,RLexSortedSetReactive
,RListMultimapReactive<K,V>
,RListReactive<V>
,RLockReactive
,RMapCacheReactive<K,V>
,RMapReactive<K,V>
,RMultimapReactive<K,V>
,RPermitExpirableSemaphoreReactive
,RQueueReactive<V>
,RScoredSortedSetReactive<V>
,RSemaphoreReactive
,RSetCacheReactive<V>
,RSetMultimapReactive<K,V>
,RSetReactive<V>
,RStreamReactive<K,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 Modifier and Type Method Description org.reactivestreams.Publisher<Boolean>
clearExpire()
Clear an expire timeout or expire date for object in mode.org.reactivestreams.Publisher<Boolean>
expire(long timeToLive, TimeUnit timeUnit)
Set a timeout for object in mode.org.reactivestreams.Publisher<Boolean>
expireAt(long timestamp)
Set an expire date for object in mode.org.reactivestreams.Publisher<Boolean>
expireAt(Date timestamp)
Set an expire date for object in mode.org.reactivestreams.Publisher<Long>
remainTimeToLive()
Get remaining time to live of object in milliseconds.
-
-
-
Method Detail
-
expire
org.reactivestreams.Publisher<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
org.reactivestreams.Publisher<Boolean> expireAt(Date timestamp)
Set an expire date for object in mode. When expire date comes the key will automatically be deleted.- Parameters:
timestamp
- - expire date- Returns:
true
if the timeout was set andfalse
if not
-
expireAt
org.reactivestreams.Publisher<Boolean> expireAt(long timestamp)
Set an expire date for object in mode. When expire date comes the key will automatically be deleted.- Parameters:
timestamp
- - expire date in milliseconds (Unix timestamp)- Returns:
true
if the timeout was set andfalse
if not
-
clearExpire
org.reactivestreams.Publisher<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
org.reactivestreams.Publisher<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.
-
-