Class RedissonMapCacheNative<K,V>
- Type Parameters:
K- keyV- value
- All Implemented Interfaces:
ConcurrentMap<K,,V> Map<K,,V> RDestroyable,RExpirable,RExpirableAsync,RMap<K,,V> RMapAsync<K,,V> RMapCacheNative<K,,V> RMapCacheNativeAsync<K,,V> RObject,RObjectAsync
- Author:
- Nikita Koksharov
-
Nested Class Summary
-
Field Summary
Fields inherited from class org.redisson.RedissonObject
codec, commandExecutor, name -
Constructor Summary
ConstructorsConstructorDescriptionRedissonMapCacheNative(Codec codec, CommandAsyncExecutor commandExecutor, String name) RedissonMapCacheNative(Codec codec, CommandAsyncExecutor commandExecutor, String name, RedissonClient redisson, MapOptions<K, V> options, WriteBehindService writeBehindService) RedissonMapCacheNative(CommandAsyncExecutor commandExecutor, String name, RedissonClient redisson, MapOptions<K, V> options, WriteBehindService writeBehindService) -
Method Summary
Modifier and TypeMethodDescriptionintaddListener(ObjectListener listener) Adds object event listeneraddListenerAsync(ObjectListener listener) Adds object event listenerbooleanClear an expire timeout or expire date for object.clearExpire(Set<K> keys) Clears an expiration timeout or date of specified entries by keys.clearExpire(K key) Clears an expiration timeout or date of specified entry by key.Clear an expire timeout or expire date for object in async mode.clearExpireAsync(String... keys) clearExpireAsync(Set<K> keys) Clears an expiration timeout or date of specified entries by keys.clearExpireAsync(K key) Clears an expiration timeout or date of specified entry by key.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(long timeToLive, TimeUnit timeUnit, String param, String... keys) expireAsync(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(long timestamp, String param, String... keys) expireAtAsync(Date timestamp) UseRExpirableAsync.expireAsync(Instant)insteadintexpireEntries(Set<K> keys, Duration ttl) Updates time to live of specified entries by keys.expireEntriesAsync(Set<K> keys, Duration ttl) Updates time to live and max idle time of specified entries by keys.intexpireEntriesIfGreater(Set<K> keys, Duration ttl) Sets time to live of specified entries by keys only if it's greater than timeout set before.expireEntriesIfGreaterAsync(Set<K> keys, Duration ttl) Sets time to live of specified entries by keys only if it's greater than timeout set before.intexpireEntriesIfLess(Set<K> keys, Duration ttl) Sets time to live of specified entries by keys only if it's less than timeout set before.expireEntriesIfLessAsync(Set<K> keys, Duration ttl) Sets time to live of specified entries by keys only if it's less than timeout set before.intexpireEntriesIfNotSet(Set<K> keys, Duration ttl) Sets time to live of specified entries by keys.expireEntriesIfNotSetAsync(Set<K> keys, Duration ttl) Sets time to live and max idle time of specified entries by keys.booleanexpireEntry(K key, Duration ttl) Updates time to live of specified entry by key.expireEntryAsync(K key, Duration ttl) Updates time to live and max idle time of specified entry by key.booleanexpireEntryIfGreater(K key, Duration ttl) Sets time to live of specified entry by key only if it's greater than timeout set before.expireEntryIfGreaterAsync(K key, Duration ttl) Sets time to live of specified entry by key only if it's greater than timeout set before.booleanexpireEntryIfLess(K key, Duration ttl) Sets time to live of specified entry by key only if it's less than timeout set before.expireEntryIfLessAsync(K key, Duration ttl) Sets time to live of specified entry by key only if it's less than timeout set before.booleanexpireEntryIfNotSet(K key, Duration ttl) Sets time to live of specified entry by key.expireEntryIfNotSetAsync(K key, Duration ttl) Sets time to live and max idle time of specified entry by key.booleanexpireIfGreater(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 value mapped by key with specified time to live.fastPutAsync(K key, V value, Duration ttl) Stores value mapped by key with specified time to live.booleanfastPutIfAbsent(K key, V value, Duration ttl) If the specified key is not already associated with a value, associate it with the given value.fastPutIfAbsentAsync(K key, V value, Duration ttl) If the specified key is not already associated with a value, associate it with the given value.fastPutIfAbsentOperationAsync(K key, V value, Duration ttl) fastPutOperationAsync(K key, V value, Duration ttl) 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.Stores value mapped by key with specified time to live.voidAssociates the specifiedvaluewith the specifiedkeyin batch.putAllAsync(Map<? extends K, ? extends V> map, Duration ttl) Associates the specifiedvaluewith the specifiedkeyin batch.putAllOperationAsync(Map<? extends K, ? extends V> map, Duration ttl) Stores value mapped by key with specified time to live.putIfAbsent(K key, V value, Duration ttl) If the specified key is not already associated with a value, associate it with the given value.putIfAbsentAsync(K key, V value, Duration ttl) If the specified key is not already associated with a value, associate it with the given value.putIfAbsentOperationAsync(K key, V value, Duration ttl) putOperationAsync(K key, V value, Duration ttl) longReturns remaining time of the object in milliseconds.remainTimeToLive(Set<K> keys) Remaining time to live of map entries associated withkeys.longremainTimeToLive(K key) Remaining time to live of map entry associated with akey.Returns remaining time of the object in milliseconds.remainTimeToLiveAsync(Set<K> keys) remainTimeToLiveAsync(K key) Remaining time to live of map entry associated with akey.voidremoveListener(int listenerId) Removes object event listenerremoveListenerAsync(int listenerId) Removes object event listenerMethods inherited from class org.redisson.RedissonMap
addAndGet, addAndGetAsync, addAndGetOperationAsync, checkKey, checkValue, clear, clearAsync, compute, computeAsync, computeIfAbsent, computeIfAbsentAsync, computeIfPresent, computeIfPresentAsync, containsKey, containsKeyAsync, containsKeyAsync, containsKeyOperationAsync, containsValue, containsValueAsync, destroy, encodeMapKeys, entryIterator, entrySet, entrySet, entrySet, entrySet, equals, fastPut, fastPutAsync, fastPutIfAbsent, fastPutIfAbsentAsync, fastPutIfAbsentOperationAsync, fastPutIfExists, fastPutIfExistsAsync, fastPutIfExistsOperationAsync, fastPutOperationAsync, fastRemove, fastRemoveAsync, fastRemoveOperationAsync, fastRemoveOperationBatchAsync, fastReplace, fastReplaceAsync, fastReplaceOperationAsync, get, getAll, getAllAsync, getAllOperationAsync, getAsync, getAsync, getCountDownLatch, getFairLock, getLock, getOperationAsync, 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, putAllOperationAsync, putAsync, putIfAbsent, putIfAbsentAsync, putIfAbsentOperationAsync, putIfExists, putIfExistsAsync, putIfExistsOperationAsync, putOperationAsync, randomEntries, randomEntriesAsync, randomKeys, randomKeysAsync, readAllEntrySet, readAllEntrySetAsync, readAllKeySet, readAllKeySetAsync, readAllMap, readAllMapAsync, readAllValues, readAllValuesAsync, remove, remove, removeAsync, removeAsync, removeOperationAsync, removeOperationAsync, replace, replace, replaceAsync, replaceAsync, replaceOperationAsync, replaceOperationAsync, scanIterator, scanIteratorAsync, scanKeyIterator, scanKeyIteratorAsync, 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, copyAsync, delete, deleteAsync, 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, renameAsync, renamenx, renamenxAsync, renamenxAsync, renamenxAsync, restore, restore, restoreAndReplace, restoreAndReplace, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, setName, sizeInMemory, sizeInMemoryAsync, 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.RDestroyable
destroyMethods 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
clearExpireAsync, expireAsync, expireAsync, expireAsync, expireAtAsync, expireAtAsync, expireIfGreaterAsync, expireIfGreaterAsync, expireIfLessAsync, expireIfLessAsync, expireIfNotSetAsync, expireIfNotSetAsync, expireIfSetAsync, expireIfSetAsync, getExpireTimeAsync, remainTimeToLiveAsyncMethods inherited from interface org.redisson.api.RMap
addAndGet, containsKey, containsValue, entrySet, entrySet, entrySet, entrySet, fastPut, fastPutIfAbsent, fastPutIfExists, fastRemove, 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, clearAsync, computeAsync, computeIfAbsentAsync, computeIfPresentAsync, containsKeyAsync, containsValueAsync, fastPutAsync, fastPutIfAbsentAsync, fastPutIfExistsAsync, fastRemoveAsync, fastReplaceAsync, getAllAsync, getAsync, loadAllAsync, loadAllAsync, mergeAsync, putAllAsync, putAllAsync, putAsync, putIfAbsentAsync, putIfExistsAsync, randomEntriesAsync, randomKeysAsync, readAllEntrySetAsync, readAllKeySetAsync, readAllMapAsync, readAllValuesAsync, removeAsync, removeAsync, replaceAsync, replaceAsync, sizeAsync, valueSizeAsyncMethods 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, deleteAsync, dumpAsync, getIdleTimeAsync, isExistsAsync, migrateAsync, moveAsync, renameAsync, renamenxAsync, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, sizeInMemoryAsync, touchAsync, unlinkAsync
-
Constructor Details
-
RedissonMapCacheNative
public RedissonMapCacheNative(CommandAsyncExecutor commandExecutor, String name, RedissonClient redisson, MapOptions<K, V> options, WriteBehindService writeBehindService) -
RedissonMapCacheNative
-
RedissonMapCacheNative
public RedissonMapCacheNative(Codec codec, CommandAsyncExecutor commandExecutor, String name, RedissonClient redisson, MapOptions<K, V> options, WriteBehindService writeBehindService)
-
-
Method Details
-
put
Description copied from interface:RMapCacheNativeStores value mapped by key with specified time to live. Entry expires after specified time to live.If the map previously contained a mapping for the key, the old value is replaced by the specified value.
- Specified by:
putin interfaceRMapCacheNative<K,V> - Parameters:
key- - map keyvalue- - map valuettl- - time to live for key\value entry. If0then stores infinitely.- Returns:
- previous associated value
-
putAsync
Description copied from interface:RMapCacheNativeAsyncStores value mapped by key with specified time to live. Entry expires after specified time to live.If the map previously contained a mapping for the key, the old value is replaced by the specified value.
- Specified by:
putAsyncin interfaceRMapCacheNativeAsync<K,V> - Parameters:
key- - map keyvalue- - map valuettl- - time to live for key\value entry. If0then stores infinitely.- Returns:
- previous associated value
-
putOperationAsync
-
fastPut
Description copied from interface:RMapCacheNativeStores value mapped by key with specified time to live. Entry expires after specified time to live.If the map previously contained a mapping for the key, the old value is replaced by the specified value.
Works faster than usual
RMapCacheNative.put(Object, Object, Duration)as it not returns previous value.- Specified by:
fastPutin interfaceRMapCacheNative<K,V> - Parameters:
key- - map keyvalue- - map valuettl- - time to live for key\value entry. If0then 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.
-
fastPutAsync
Description copied from interface:RMapCacheNativeAsyncStores value mapped by key with specified time to live. Entry expires after specified time to live.If the map previously contained a mapping for the key, the old value is replaced by the specified value.
Works faster than usual
RMapCacheNativeAsync.putAsync(Object, Object, Duration)as it not returns previous value.- Specified by:
fastPutAsyncin interfaceRMapCacheNativeAsync<K,V> - Parameters:
key- - map keyvalue- - map valuettl- - time to live for key\value entry. If0then 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.
-
fastPutOperationAsync
-
putIfAbsent
Description copied from interface:RMapCacheNativeIf 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. Entry expires after specified time to live.
- Specified by:
putIfAbsentin interfaceRMapCacheNative<K,V> - Parameters:
key- - map keyvalue- - map valuettl- - time to live for key\value entry. If0then stores infinitely.- Returns:
- current associated value
-
putIfAbsentAsync
Description copied from interface:RMapCacheNativeAsyncIf 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. Entry expires after specified time to live.
- Specified by:
putIfAbsentAsyncin interfaceRMapCacheNativeAsync<K,V> - Parameters:
key- - map keyvalue- - map valuettl- - time to live for key\value entry. If0then stores infinitely.- Returns:
- current associated value
-
putIfAbsentOperationAsync
-
fastPutIfAbsent
Description copied from interface:RMapCacheNativeIf 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. Entry expires after specified time to live.
Works faster than usual
RMapCacheNative.putIfAbsent(Object, Object, Duration)as it not returns previous value.- Specified by:
fastPutIfAbsentin interfaceRMapCacheNative<K,V> - Parameters:
key- - map keyvalue- - map valuettl- - time to live for key\value entry. If0then stores infinitely.- Returns:
trueif key is a new key in the hash and value was set.falseif key already exists in the hash
-
fastPutIfAbsentAsync
Description copied from interface:RMapCacheNativeAsyncIf 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. Entry expires after specified time to live.
Works faster than usual
RMapCacheNativeAsync.putIfAbsentAsync(Object, Object, Duration)as it not returns previous value.- Specified by:
fastPutIfAbsentAsyncin interfaceRMapCacheNativeAsync<K,V> - Parameters:
key- - map keyvalue- - map valuettl- - time to live for key\value entry. If0then stores infinitely.- Returns:
trueif key is a new key in the hash and value was set.falseif key already exists in the hash
-
fastPutIfAbsentOperationAsync
-
remainTimeToLive
Description copied from interface:RMapCacheNativeRemaining time to live of map entry associated with akey.- Specified by:
remainTimeToLivein interfaceRMapCacheNative<K,V> - Parameters:
key- map key- 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:RMapCacheNativeAsyncRemaining time to live of map entry associated with akey.- Specified by:
remainTimeToLiveAsyncin interfaceRMapCacheNativeAsync<K,V> - Parameters:
key- - map key- Returns:
- time in milliseconds -2 if the key does not exist. -1 if the key exists but has no associated expire.
-
remainTimeToLive
Description copied from interface:RMapCacheNativeRemaining time to live of map entries associated withkeys.- Specified by:
remainTimeToLivein interfaceRMapCacheNative<K,V> - Parameters:
keys- map keys- Returns:
- Time to live mapped by key. Time in milliseconds -2 if the key does not exist. -1 if the key exists but has no associated expire.
-
remainTimeToLiveAsync
- Specified by:
remainTimeToLiveAsyncin interfaceRMapCacheNativeAsync<K,V>
-
putAll
Description copied from interface:RMapCacheNativeAssociates the specifiedvaluewith the specifiedkeyin batch.If
MapWriteris defined then new map entries will be stored in write-through mode.- Specified by:
putAllin interfaceRMapCacheNative<K,V> - Parameters:
map- - mappings to be stored in this mapttl- - time to live for all key\value entries. If0then stores infinitely.
-
putAllAsync
Description copied from interface:RMapCacheNativeAsyncAssociates the specifiedvaluewith the specifiedkeyin batch.If
MapWriteris defined then new map entries will be stored in write-through mode.- Specified by:
putAllAsyncin interfaceRMapCacheNativeAsync<K,V> - Parameters:
map- - mappings to be stored in this mapttl- - time to live for all key\value entries. If0then stores infinitely.
-
putAllOperationAsync
-
expireEntry
Description copied from interface:RMapCacheNativeUpdates time to live of specified entry by key. Entry expires when specified time to live was reached.Returns
falseif entry already expired or doesn't exist, otherwise returnstrue.- Specified by:
expireEntryin interfaceRMapCacheNative<K,V> - Parameters:
key- map keyttl- time to live for key\value entry. If0then time to live doesn't affect entry expiration.if
ttlparams are equal to0then entry stores infinitely.- Returns:
- returns
falseif entry already expired or doesn't exist, otherwise returnstrue.
-
expireEntryAsync
Description copied from interface:RMapCacheNativeAsyncUpdates time to live and max idle time of specified entry by key. Entry expires when specified time to live was reached.Returns
falseif entry already expired or doesn't exist, otherwise returnstrue.- Specified by:
expireEntryAsyncin interfaceRMapCacheNativeAsync<K,V> - Parameters:
key- map keyttl- time to live for key\value entry. If0then time to live doesn't affect entry expiration.if
maxIdleTimeandttlparams are equal to0then entry stores infinitely.- Returns:
- returns
falseif entry already expired or doesn't exist, otherwise returnstrue.
-
expireEntryIfNotSet
Description copied from interface:RMapCacheNativeSets time to live of specified entry by key. If these parameters weren't set before. Entry expires when specified time to live was reached.Returns
falseif entry already has expiration time or doesn't exist, otherwise returnstrue.- Specified by:
expireEntryIfNotSetin interfaceRMapCacheNative<K,V> - Parameters:
key- map keyttl- time to live for key\value entry. If0then time to live doesn't affect entry expiration.if
ttlparams are equal to0then entry stores infinitely.- Returns:
- returns
falseif entry already has expiration time or doesn't exist, otherwise returnstrue.
-
expireEntryIfNotSetAsync
Description copied from interface:RMapCacheNativeAsyncSets time to live and max idle time of specified entry by key. If these parameters weren't set before. Entry expires when specified time to live was reached.Returns
falseif entry already has expiration time or doesn't exist, otherwise returnstrue.- Specified by:
expireEntryIfNotSetAsyncin interfaceRMapCacheNativeAsync<K,V> - Parameters:
key- map keyttl- time to live for key\value entry. If0then time to live doesn't affect entry expiration.if
maxIdleTimeandttlparams are equal to0then entry stores infinitely.- Returns:
- returns
falseif entry already has expiration time or doesn't exist, otherwise returnstrue.
-
expireEntries
Description copied from interface:RMapCacheNativeUpdates time to live of specified entries by keys. Entries expires when specified time to live was reached.Returns amount of updated entries.
- Specified by:
expireEntriesin interfaceRMapCacheNative<K,V> - Parameters:
keys- map keysttl- time to live for key\value entries. If0then time to live doesn't affect entry expiration.if
ttlparams are equal to0then entries are stored infinitely.- Returns:
- amount of updated entries.
-
expireEntriesAsync
Description copied from interface:RMapCacheNativeAsyncUpdates time to live and max idle time of specified entries by keys. Entries expires when specified time to live was reached.Returns amount of updated entries.
- Specified by:
expireEntriesAsyncin interfaceRMapCacheNativeAsync<K,V> - Parameters:
keys- map keysttl- time to live for key\value entries. If0then time to live doesn't affect entry expiration.if
ttlparams are equal to0then entries are stored infinitely.- Returns:
- amount of updated entries.
-
expireEntriesIfNotSet
Description copied from interface:RMapCacheNativeSets time to live of specified entries by keys. If these parameters weren't set before. Entries expire when specified time to live was reached.Returns amount of updated entries.
- Specified by:
expireEntriesIfNotSetin interfaceRMapCacheNative<K,V> - Parameters:
keys- map keysttl- time to live for key\value entry. If0then time to live doesn't affect entry expiration.if
ttlparams are equal to0then entry stores infinitely.- Returns:
- amount of updated entries.
-
expireEntriesIfNotSetAsync
Description copied from interface:RMapCacheNativeAsyncSets time to live and max idle time of specified entries by keys. If these parameters weren't set before. Entries expire when specified time to live was reached.Returns amount of updated entries.
- Specified by:
expireEntriesIfNotSetAsyncin interfaceRMapCacheNativeAsync<K,V> - Parameters:
keys- map keysttl- time to live for key\value entry. If0then time to live doesn't affect entry expiration.if
ttlparams are equal to0then entry stores infinitely.- Returns:
- amount of updated entries.
-
expireEntryIfGreater
Description copied from interface:RMapCacheNativeSets time to live of specified entry by key only if it's greater than timeout set before. Entry expires when specified time to live was reached.Returns
falseif entry already has expiration time or doesn't exist, otherwise returnstrue.- Specified by:
expireEntryIfGreaterin interfaceRMapCacheNative<K,V> - Parameters:
key- map keyttl- time to live for key\value entry. If0then time to live doesn't affect entry expiration.if
ttlparams are equal to0then entry stores infinitely.- Returns:
- returns
falseif entry already has expiration time or doesn't exist, otherwise returnstrue.
-
expireEntryIfLess
Description copied from interface:RMapCacheNativeSets time to live of specified entry by key only if it's less than timeout set before. Entry expires when specified time to live was reached.Returns
falseif entry already has expiration time or doesn't exist, otherwise returnstrue.- Specified by:
expireEntryIfLessin interfaceRMapCacheNative<K,V> - Parameters:
key- map keyttl- time to live for key\value entry. If0then time to live doesn't affect entry expiration.if
ttlparams are equal to0then entry stores infinitely.- Returns:
- returns
falseif entry already has expiration time or doesn't exist, otherwise returnstrue.
-
expireEntriesIfGreater
Description copied from interface:RMapCacheNativeSets time to live of specified entries by keys only if it's greater than timeout set before. Entries expire when specified time to live was reached.Returns amount of updated entries.
- Specified by:
expireEntriesIfGreaterin interfaceRMapCacheNative<K,V> - Parameters:
keys- map keysttl- time to live for key\value entry. If0then time to live doesn't affect entry expiration.if
ttlparams are equal to0then entry stores infinitely.- Returns:
- amount of updated entries.
-
expireEntriesIfLess
Description copied from interface:RMapCacheNativeSets time to live of specified entries by keys only if it's less than timeout set before. Entries expire when specified time to live was reached.Returns amount of updated entries.
- Specified by:
expireEntriesIfLessin interfaceRMapCacheNative<K,V> - Parameters:
keys- map keysttl- time to live for key\value entry. If0then time to live doesn't affect entry expiration.if
ttlparams are equal to0then entry stores infinitely.- Returns:
- amount of updated entries.
-
expireEntryIfGreaterAsync
Description copied from interface:RMapCacheNativeAsyncSets time to live of specified entry by key only if it's greater than timeout set before. Entry expires when specified time to live was reached.Returns
falseif entry already has expiration time or doesn't exist, otherwise returnstrue.- Specified by:
expireEntryIfGreaterAsyncin interfaceRMapCacheNativeAsync<K,V> - Parameters:
key- map keyttl- time to live for key\value entry. If0then time to live doesn't affect entry expiration.if
ttlparams are equal to0then entry stores infinitely.- Returns:
- returns
falseif entry already has expiration time or doesn't exist, otherwise returnstrue.
-
expireEntryIfLessAsync
Description copied from interface:RMapCacheNativeAsyncSets time to live of specified entry by key only if it's less than timeout set before. Entry expires when specified time to live was reached.Returns
falseif entry already has expiration time or doesn't exist, otherwise returnstrue.- Specified by:
expireEntryIfLessAsyncin interfaceRMapCacheNativeAsync<K,V> - Parameters:
key- map keyttl- time to live for key\value entry. If0then time to live doesn't affect entry expiration.if
ttlparams are equal to0then entry stores infinitely.- Returns:
- returns
falseif entry already has expiration time or doesn't exist, otherwise returnstrue.
-
expireEntriesIfGreaterAsync
Description copied from interface:RMapCacheNativeAsyncSets time to live of specified entries by keys only if it's greater than timeout set before. Entries expire when specified time to live was reached.Returns amount of updated entries.
- Specified by:
expireEntriesIfGreaterAsyncin interfaceRMapCacheNativeAsync<K,V> - Parameters:
keys- map keysttl- time to live for key\value entry. If0then time to live doesn't affect entry expiration.if
ttlparams are equal to0then entry stores infinitely.- Returns:
- amount of updated entries.
-
expireEntriesIfLessAsync
Description copied from interface:RMapCacheNativeAsyncSets time to live of specified entries by keys only if it's less than timeout set before. Entries expire when specified time to live was reached.Returns amount of updated entries.
- Specified by:
expireEntriesIfLessAsyncin interfaceRMapCacheNativeAsync<K,V> - Parameters:
keys- map keysttl- time to live for key\value entry. If0then time to live doesn't affect entry expiration.if
ttlparams are equal to0then entry stores infinitely.- Returns:
- amount of updated entries.
-
clearExpire
Description copied from interface:RMapCacheNativeClears an expiration timeout or date of specified entry by key.- Specified by:
clearExpirein interfaceRMapCacheNative<K,V> - Parameters:
key- map key- Returns:
trueif timeout was removedfalseif entry does not have an associated timeoutnullif entry does not exist
-
clearExpireAsync
Description copied from interface:RMapCacheNativeAsyncClears an expiration timeout or date of specified entry by key.- Specified by:
clearExpireAsyncin interfaceRMapCacheNativeAsync<K,V> - Parameters:
key- map key- Returns:
trueif timeout was removedfalseif entry does not have an associated timeoutnullif entry does not exist
-
clearExpire
Description copied from interface:RMapCacheNativeClears an expiration timeout or date of specified entries by keys.- Specified by:
clearExpirein interfaceRMapCacheNative<K,V> - Parameters:
keys- map keys- Returns:
- Boolean mapped by key.
trueif timeout was removedfalseif entry does not have an associated timeoutnullif entry does not exist
-
clearExpireAsync
Description copied from interface:RMapCacheNativeAsyncClears an expiration timeout or date of specified entries by keys.- Specified by:
clearExpireAsyncin interfaceRMapCacheNativeAsync<K,V> - Parameters:
keys- map keys- Returns:
- Boolean mapped by key.
trueif timeout was removedfalseif entry does not have an associated timeoutnullif entry does not exist
-
addListener
Description copied from interface:RObjectAdds object event listener- Specified by:
addListenerin interfaceRMap<K,V> - Specified by:
addListenerin interfaceRMapCacheNative<K,V> - Specified by:
addListenerin interfaceRObject- Overrides:
addListenerin classRedissonMap<K,V> - Parameters:
listener- - object event listener- Returns:
- listener id
- See Also:
-
addListenerAsync
Description copied from interface:RObjectAsyncAdds object event listener- Specified by:
addListenerAsyncin interfaceRMapAsync<K,V> - Specified by:
addListenerAsyncin interfaceRMapCacheNativeAsync<K,V> - Specified by:
addListenerAsyncin interfaceRObjectAsync- Overrides:
addListenerAsyncin classRedissonMap<K,V> - Parameters:
listener- - object event listener- Returns:
- listener id
- See Also:
-
removeListener
public void removeListener(int listenerId) Description copied from interface:RObjectRemoves object event listener- Specified by:
removeListenerin interfaceRObject- Overrides:
removeListenerin classRedissonMap<K,V> - Parameters:
listenerId- - listener id
-
removeListenerAsync
Description copied from interface:RObjectAsyncRemoves object event listener- Specified by:
removeListenerAsyncin interfaceRObjectAsync- Overrides:
removeListenerAsyncin classRedissonMap<K,V> - Parameters:
listenerId- - listener id
-
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
-
clearExpireAsync
Description copied from interface:RExpirableAsyncClear an expire timeout or expire date for object in async mode. Object will not be deleted.- Specified by:
clearExpireAsyncin interfaceRExpirableAsync- Returns:
trueif the timeout was cleared andfalseif not
-
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.
-
expireAsync
-
expireAtAsync
-
clearExpireAsync
-