Class MapCacheNativeWrapper<K,V>
- All Implemented Interfaces:
ConcurrentMap<K,,V> Map<K,,V> RDestroyable,RExpirable,RExpirableAsync,RMap<K,,V> RMapAsync<K,,V> RMapCache<K,,V> RMapCacheAsync<K,,V> RObject,RObjectAsync
-
Nested Class Summary
-
Field Summary
Fields inherited from class org.redisson.RedissonMapCache
publishCommandFields inherited from class org.redisson.RedissonObject
codec, commandExecutor, name -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clears map without removing options data used during map creation.booleanClear an expire timeout or expire date for object.clearExpireAsync(String... keys) booleancontainsKey(Object key) Returnstrueif this map contains map entry mapped by specifiedkey, otherwisefalsevoiddestroy()Destroys object when it's not necessary anymore.booleanUseRExpirable.expire(Duration)insteadbooleanSets a timeout for this object.booleanSets an expiration date for this object.expireAsync(long timeToLive, TimeUnit timeUnit) UseRExpirableAsync.expireAsync(Duration)insteadexpireAsync(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(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.booleanStores the specifiedvaluemapped by specifiedkey.booleanStores value mapped by key with specified time to live and max idle time.fastPutAsync(K key, V value, long ttl, TimeUnit ttlUnit, long maxIdleTime, TimeUnit maxIdleUnit) Stores value mapped by key with specified time to live and max idle time.longfastRemove(K... keys) Removes map entries mapped by specifiedkeys.longReturns expiration time of the object as the absolute Unix expiration timestamp in milliseconds.Returns expiration time of the object as the absolute Unix expiration timestamp in milliseconds.getWithTTLOnly(K key) Returns the value mapped by definedkeyornullif value is absent.putIfAbsent(K key, V value, long ttl, TimeUnit ttlUnit, long maxIdleTime, TimeUnit maxIdleUnit) If the specified key is not already associated with a value, associate it with the given value.putIfAbsentAsync(K key, V value, long ttl, TimeUnit ttlUnit, long maxIdleTime, TimeUnit maxIdleUnit) If the specified key is not already associated with a value, associate it with the given value.longReturns remaining time of the object in milliseconds.Returns remaining time of the object in milliseconds.Methods inherited from class org.redisson.RedissonMapCache
addAndGet, addAndGetOperationAsync, addListener, addListenerAsync, clearExpireAsync, computeIfAbsent, containsKeyOperationAsync, containsValueAsync, copyAsync, deleteAsync, expireAsync, expireAtAsync, expireEntries, expireEntriesAsync, expireEntriesIfNotSet, expireEntriesIfNotSetAsync, expireEntry, expireEntryAsync, expireEntryIfNotSet, expireEntryIfNotSetAsync, fastPut, fastPutAsync, fastPutIfAbsent, fastPutIfAbsent, fastPutIfAbsentAsync, fastPutIfAbsentOperationAsync, fastPutIfExistsOperationAsync, fastPutOperationAsync, fastPutOperationAsync, fastRemoveOperationAsync, fastRemoveOperationBatchAsync, fastReplaceOperationAsync, getAllOperationAsync, getAllWithTTLOnly, getAllWithTTLOnlyAsync, getAllWithTTLOnlyOperationAsync, getOperationAsync, getTopic, getWithTTLOnlyAsync, put, put, putAll, putAllAsync, putAllOperationAsync, putAsync, putAsync, putIfAbsent, putIfAbsentAsync, putIfAbsentOperationAsync, putIfExistsOperationAsync, putOperationAsync, putOperationAsync, randomEntriesAsync, randomKeysAsync, readAllEntrySetAsync, readAllKeySetAsync, readAllMapAsync, readAllValuesAsync, remainTimeToLive, remainTimeToLiveAsync, removeListener, removeListenerAsync, removeOperationAsync, removeOperationAsync, renameAsync, renamenxAsync, replaceOperationAsync, replaceOperationAsync, scanIteratorAsync, scanKeyIteratorAsync, setMaxSize, setMaxSize, setMaxSizeAsync, setMaxSizeAsync, sizeInMemoryAsync, trySetMaxSize, trySetMaxSize, trySetMaxSizeAsync, trySetMaxSizeAsync, updateEntryExpiration, updateEntryExpirationAsyncMethods inherited from class org.redisson.RedissonMap
addAndGetAsync, addListener, addListenerAsync, checkKey, checkValue, compute, computeAsync, computeIfAbsent, computeIfAbsentAsync, computeIfPresent, computeIfPresentAsync, containsKeyAsync, containsKeyAsync, containsValue, encodeMapKeys, entryIterator, entrySet, entrySet, entrySet, entrySet, equals, fastPutAsync, fastPutIfAbsent, fastPutIfAbsentAsync, fastPutIfExists, fastPutIfExistsAsync, fastRemoveAsync, fastReplace, fastReplaceAsync, get, getAll, getAllAsync, getAsync, getAsync, getCountDownLatch, getFairLock, getLock, getPermitExpirableSemaphore, getReadWriteLock, getSemaphore, hashCode, hasNoLoader, hasNoWriter, isEmpty, keyIterator, keySet, keySet, keySet, keySet, loadAll, loadAll, loadAllAsync, loadAllAsync, loadAllMapAsync, loadValue, loadValue, mapReduce, mapWriterFuture, mapWriterFuture, merge, mergeAsync, put, putAll, putAll, putAllAsync, putAllAsync, putAsync, putIfAbsent, putIfAbsentAsync, putIfExists, putIfExistsAsync, randomEntries, randomKeys, readAllEntrySet, readAllKeySet, readAllMap, readAllValues, remove, remove, removeAsync, removeAsync, replace, replace, replaceAsync, replaceAsync, scanIterator, scanKeyIterator, size, sizeAsync, valueIterator, values, values, values, values, valueSize, valueSizeAsyncMethods inherited from class org.redisson.RedissonObject
addListener, addListenerAsync, addListenerId, addTrackingListener, addTrackingListenerAsync, checkNotBatch, copy, copy, copy, copyAndReplace, copyAndReplace, copyAndReplaceAsync, copyAndReplaceAsync, copyAsync, copyAsync, copyAsync, copyAsync, delete, deleteAsync, dump, dumpAsync, encode, encode, encode, encode, encodeMapKey, encodeMapKey, encodeMapKeys, encodeMapValue, encodeMapValues, get, getCodec, getIdleTime, getIdleTimeAsync, getListenerIdsByName, getLockByMapKey, getLockByValue, getName, getNameByListenerId, getRawName, getRawName, getServiceManager, getSubscribeService, isExists, isExistsAsync, map, mapName, migrate, migrateAsync, move, moveAsync, prefixName, removeListener, removeListenerAsync, removeListenerAsync, removeListenerId, removeListeners, removeTrackingListener, removeTrackingListenerAsync, rename, renameAsync, renameAsync, renamenx, renamenxAsync, 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, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.concurrent.ConcurrentMap
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, replaceAllMethods 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.RMap
addListener, containsValue, entrySet, entrySet, entrySet, entrySet, fastPutIfAbsent, fastPutIfExists, fastReplace, get, getAll, getCountDownLatch, getFairLock, getLock, getPermitExpirableSemaphore, getReadWriteLock, getSemaphore, keySet, keySet, keySet, keySet, loadAll, loadAll, mapReduce, put, putAll, putAll, putIfAbsent, putIfExists, randomEntries, randomKeys, readAllEntrySet, readAllKeySet, readAllMap, readAllValues, remove, remove, replace, replace, values, values, values, values, valueSizeMethods inherited from interface org.redisson.api.RMapAsync
addAndGetAsync, addListenerAsync, computeAsync, computeIfAbsentAsync, computeIfPresentAsync, containsKeyAsync, fastPutAsync, fastPutIfAbsentAsync, fastPutIfExistsAsync, fastRemoveAsync, fastReplaceAsync, getAllAsync, getAsync, loadAllAsync, loadAllAsync, mergeAsync, putAllAsync, putAllAsync, putAsync, putIfAbsentAsync, putIfExistsAsync, removeAsync, removeAsync, replaceAsync, replaceAsync, valueSizeAsyncMethods inherited from interface org.redisson.api.RMapCacheAsync
sizeAsyncMethods inherited from interface org.redisson.api.RObject
copy, copy, copy, copyAndReplace, copyAndReplace, delete, dump, getCodec, getIdleTime, getName, isExists, migrate, move, rename, renamenx, restore, restore, restoreAndReplace, restoreAndReplace, sizeInMemory, touch, unlinkMethods inherited from interface org.redisson.api.RObjectAsync
copyAndReplaceAsync, copyAndReplaceAsync, copyAsync, copyAsync, copyAsync, dumpAsync, getIdleTimeAsync, isExistsAsync, migrateAsync, moveAsync, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, touchAsync, unlinkAsync
-
Constructor Details
-
MapCacheNativeWrapper
-
-
Method Details
-
getWithTTLOnly
Description copied from interface:RMapCacheReturns the value mapped by definedkeyornullif value is absent.If map doesn't contain value for specified key and
MapLoaderis defined then value will be loaded in read-through mode.NOTE: Idle time of entry is not taken into account. Entry last access time isn't modified if map limited by size.
- Specified by:
getWithTTLOnlyin interfaceRMapCache<K,V> - Overrides:
getWithTTLOnlyin classRedissonMapCache<K,V> - Parameters:
key- the key- Returns:
- the value mapped by defined
keyornullif value is absent
-
fastPut
Description copied from interface:RMapStores the specifiedvaluemapped by specifiedkey.Works faster than
but not returning previous value.RMap.put(Object, Object)Returns
trueif key is a new key in the hash and value was set orfalseif key already exists in the hash and the value was updated.If
MapWriteris defined then map entry is stored in write-through mode. -
fastPutAsync
public RFuture<Boolean> fastPutAsync(K key, V value, long ttl, TimeUnit ttlUnit, long maxIdleTime, TimeUnit maxIdleUnit) Description copied from interface:RMapCacheAsyncStores value mapped by key with specified time to live and max idle time. Entry expires when specified time to live or max idle time has expired.If the map previously contained a mapping for the key, the old value is replaced by the specified value.
Works faster than usual
RMapCacheAsync.putAsync(Object, Object, long, TimeUnit, long, TimeUnit)as it not returns previous value.- Specified by:
fastPutAsyncin interfaceRMapCacheAsync<K,V> - Overrides:
fastPutAsyncin classRedissonMapCache<K,V> - Parameters:
key- - map keyvalue- - map valuettl- - time to live for key\value entry. If0then time to live doesn't affect entry expiration.ttlUnit- - time unitmaxIdleTime- - max idle time for key\value entry. If0then max idle time doesn't affect entry expiration.maxIdleUnit- - time unitif
maxIdleTimeandttlparams are equal to0then entry stores infinitely.- Returns:
trueif key is a new key in the hash and value was set.falseif key already exists in the hash and the value was updated.
-
fastPut
public boolean fastPut(K key, V value, long ttl, TimeUnit ttlUnit, long maxIdleTime, TimeUnit maxIdleUnit) Description copied from interface:RMapCacheStores value mapped by key with specified time to live and max idle time. Entry expires when specified time to live or max idle time has expired.If the map previously contained a mapping for the key, the old value is replaced by the specified value.
Works faster than usual
RMapCache.put(Object, Object, long, TimeUnit, long, TimeUnit)as it not returns previous value.- Specified by:
fastPutin interfaceRMapCache<K,V> - Overrides:
fastPutin classRedissonMapCache<K,V> - Parameters:
key- - map keyvalue- - map valuettl- - time to live for key\value entry. If0then time to live doesn't affect entry expiration.ttlUnit- - time unitmaxIdleTime- - max idle time for key\value entry. If0then max idle time doesn't affect entry expiration.maxIdleUnit- - time unitif
maxIdleTimeandttlparams are equal to0then entry stores infinitely.- Returns:
trueif key is a new key in the hash and value was set.falseif key already exists in the hash and the value was updated.
-
putIfAbsentAsync
public RFuture<V> putIfAbsentAsync(K key, V value, long ttl, TimeUnit ttlUnit, long maxIdleTime, TimeUnit maxIdleUnit) Description copied from interface:RMapCacheAsyncIf the specified key is not already associated with a value, associate it with the given value.Stores value mapped by key with specified time to live and max idle time. Entry expires when specified time to live or max idle time has expired.
If the map previously contained a mapping for the key, the old value is replaced by the specified value.
- Specified by:
putIfAbsentAsyncin interfaceRMapCacheAsync<K,V> - Overrides:
putIfAbsentAsyncin classRedissonMapCache<K,V> - Parameters:
key- - map keyvalue- - map valuettl- - time to live for key\value entry. If0then time to live doesn't affect entry expiration.ttlUnit- - time unitmaxIdleTime- - max idle time for key\value entry. If0then max idle time doesn't affect entry expiration.maxIdleUnit- - time unitif
maxIdleTimeandttlparams are equal to0then entry stores infinitely.- Returns:
- previous associated value
-
putIfAbsent
public V putIfAbsent(K key, V value, long ttl, TimeUnit ttlUnit, long maxIdleTime, TimeUnit maxIdleUnit) Description copied from interface:RMapCacheIf the specified key is not already associated with a value, associate it with the given value.Stores value mapped by key with specified time to live and max idle time. Entry expires when specified time to live or max idle time has expired.
- Specified by:
putIfAbsentin interfaceRMapCache<K,V> - Overrides:
putIfAbsentin classRedissonMapCache<K,V> - Parameters:
key- - map keyvalue- - map valuettl- - time to live for key\value entry. If0then time to live doesn't affect entry expiration.ttlUnit- - time unitmaxIdleTime- - max idle time for key\value entry. If0then max idle time doesn't affect entry expiration.maxIdleUnit- - time unitif
maxIdleTimeandttlparams are equal to0then entry stores infinitely.- Returns:
- current associated value
-
containsKey
Description copied from interface:RMapReturnstrueif this map contains map entry mapped by specifiedkey, otherwisefalse- Specified by:
containsKeyin interfaceMap<K,V> - Specified by:
containsKeyin interfaceRMap<K,V> - Overrides:
containsKeyin classRedissonMap<K,V> - Parameters:
key- - map key- Returns:
trueif this map contains map entry mapped by specifiedkey, otherwisefalse
-
clear
public void clear() -
clearAsync
Description copied from interface:RMapAsyncClears map without removing options data used during map creation.- Specified by:
clearAsyncin interfaceRMapAsync<K,V> - Overrides:
clearAsyncin classRedissonMapCache<K,V> - Returns:
trueif map was clearedfalseif not
-
fastRemove
Description copied from interface:RMapRemoves map entries mapped by specifiedkeys.Works faster than
but not returning the value.RMap.remove(Object)If
MapWriteris defined thenkeysare deleted in write-through mode.- Specified by:
fastRemovein interfaceRMap<K,V> - Overrides:
fastRemovein classRedissonMap<K,V> - Parameters:
keys- - map keys- Returns:
- the number of keys that were removed from the hash, not including specified but non existing keys
-
destroy
public void destroy()Description copied from interface:RDestroyableDestroys object when it's not necessary anymore.- Specified by:
destroyin interfaceRDestroyable- Overrides:
destroyin classRedissonMapCache<K,V>
-
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:RExpirableReturns remaining time of the object in milliseconds.- 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:RExpirableAsyncReturns remaining time of the object in milliseconds.- 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:RExpirableReturns expiration time of the object as the absolute Unix expiration timestamp in milliseconds.Requires Redis 7.0.0 and higher.
- Specified by:
getExpireTimein interfaceRExpirable- Returns:
- Unix time in milliseconds -2 if the key does not exist. -1 if the key exists but has no associated expiration time.
-
getExpireTimeAsync
Description copied from interface:RExpirableAsyncReturns expiration time of the object as the absolute Unix expiration timestamp in milliseconds.Requires Redis 7.0.0 and higher.
- Specified by:
getExpireTimeAsyncin interfaceRExpirableAsync- Returns:
- Unix time in milliseconds -2 if the key does not exist. -1 if the key exists but has no associated expiration time.
-
clearExpireAsync
-