public interface RExpirable extends RObject, RExpirableAsync
Modifier and Type | Method and Description |
---|---|
boolean |
clearExpire()
Clear an expire timeout or expire date for object.
|
boolean |
expire(long timeToLive,
TimeUnit timeUnit)
Set a timeout for object.
|
boolean |
expireAt(Date timestamp)
Set an expire date for object.
|
boolean |
expireAt(long timestamp)
Set an expire date for object.
|
long |
remainTimeToLive()
Remaining time to live of Redisson object that has a timeout
|
addListener, copy, delete, dump, getCodec, getIdleTime, getName, isExists, migrate, move, removeListener, rename, renamenx, restore, restore, restoreAndReplace, restoreAndReplace, sizeInMemory, touch, unlink
clearExpireAsync, expireAsync, expireAtAsync, expireAtAsync, remainTimeToLiveAsync
addListenerAsync, copyAsync, deleteAsync, dumpAsync, getIdleTimeAsync, isExistsAsync, migrateAsync, moveAsync, removeListenerAsync, renameAsync, renamenxAsync, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, sizeInMemoryAsync, touchAsync, unlinkAsync
boolean expire(long timeToLive, TimeUnit timeUnit)
timeToLive
- - timeout before object will be deletedtimeUnit
- - timeout time unittrue
if the timeout was set and false
if notboolean expireAt(long timestamp)
timestamp
- - expire date in milliseconds (Unix timestamp)true
if the timeout was set and false
if notboolean expireAt(Date timestamp)
timestamp
- - expire datetrue
if the timeout was set and false
if notboolean clearExpire()
true
if timeout was removed
false
if object does not exist or does not have an associated timeoutlong remainTimeToLive()
Copyright © 2014–2020 Redisson. All rights reserved.