Class RedissonTransactionalMapCache<K,V>
- Type Parameters:
K- key typeV- value type
- 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
- Author:
- Nikita Koksharov
-
Nested Class Summary
-
Field Summary
Fields inherited from class org.redisson.RedissonMapCache
publishCommandFields inherited from class org.redisson.RedissonObject
codec, commandExecutor, name -
Constructor Summary
ConstructorsConstructorDescriptionRedissonTransactionalMapCache(Codec codec, CommandAsyncExecutor commandExecutor, String name, List<TransactionalOperation> operations, long timeout, AtomicBoolean executed, String transactionId) RedissonTransactionalMapCache(CommandAsyncExecutor commandExecutor, String name, List<TransactionalOperation> operations, long timeout, AtomicBoolean executed, String transactionId) -
Method Summary
Modifier and TypeMethodDescriptionaddAndGetOperationAsync(K key, Number value) protected voidbooleanClear an expire timeout or expire date for object.Clear an expire timeout or expire date for object in async mode.clearExpireAsync(String... keys) containsKeyAsync(Object key) Returnstrueif this map contains map entry mapped by specifiedkey, otherwisefalsecontainsValueAsync(Object value) Returnstrueif this map contains any map entry with specifiedvalue, otherwisefalseDelete object in async modebooleanUseRExpirable.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)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.fastPutIfAbsentAsync(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.fastPutIfAbsentOperationAsync(K key, V value) fastPutIfExistsOperationAsync(K key, V value) fastPutOperationAsync(K key, V value) fastPutOperationAsync(K key, V value, long ttl, TimeUnit ttlUnit, long maxIdleTime, TimeUnit maxIdleUnit) fastRemoveOperationAsync(K... keys) getAllOperationAsync(Set<K> keys) getCountDownLatch(K key) ReturnsRCountDownLatchinstance associated with keylongExpiration time of Redisson object that has a timeoutExpiration time of Redisson object that has a timeoutgetFairLock(K key) ReturnsRLockinstance associated with keyReturnsRLockinstance associated with keygetOperationAsync(K key) ReturnsRPermitExpirableSemaphoreinstance associated with keygetReadWriteLock(K key) ReturnsRReadWriteLockinstance associated with keygetSemaphore(K key) ReturnsRSemaphoreinstance associated with keyCheck object existence in async mode.loadAllAsync(boolean replaceExistingValues, int parallelism) Loads all map entries to this Redis map usingMapLoader.loadAllAsync(Set<? extends K> keys, boolean replaceExistingValues, int parallelism) Loads map entries usingMapLoaderwhose keys are listed in definedkeysparameter.<KOut,VOut>
RMapReduce<K, V, KOut, VOut> ReturnsRMapReduceobject associated with this mapmigrateAsync(String host, int port, int database, long timeout) Transfer object from source Redis instance to destination Redis instance in async modemoveAsync(int database) Move object to another database in async modeputAllOperationAsync(Map<? extends K, ? extends V> entries) 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.putIfAbsentOperationAsync(K key, V value) putIfExistsOperationAsync(K key, V value) putOperationAsync(K key, V value) putOperationAsync(K key, V value, long ttlTimeout, long maxIdleTimeout, long maxIdleDelta, long ttlTimeoutDelta) Read all map entries at onceRead all keys at onceRead all map as local instance at onceRead all values at oncelongRemaining time to live of Redisson object that has a timeoutRemaining time to live of Redisson object that has a timeoutremoveOperationAsync(Object key, Object value) removeOperationAsync(K key) replaceOperationAsync(K key, V value) replaceOperationAsync(K key, V oldValue, V newValue) scanIterator(String name, RedisClient client, long startPos, String pattern, int count) setMaxSizeAsync(int maxSize) Sets max size of the map and overrides current value.Update the last access time of an object in async mode.trySetMaxSizeAsync(int maxSize) Tries to set max size of the map.Delete the objects.valueSizeAsync(K key) Returns size of value mapped by key in bytesMethods inherited from class org.redisson.RedissonMapCache
addAndGet, addListener, addListenerAsync, clear, clearAsync, containsKeyOperationAsync, destroy, expireEntries, expireEntriesAsync, expireEntriesIfNotSet, expireEntriesIfNotSetAsync, expireEntry, expireEntryAsync, expireEntryIfNotSet, expireEntryIfNotSetAsync, fastPut, fastPut, fastPutAsync, fastPutAsync, fastPutIfAbsent, fastPutIfAbsent, fastRemoveOperationBatchAsync, fastReplaceOperationAsync, getAllWithTTLOnly, getAllWithTTLOnlyAsync, getAllWithTTLOnlyOperationAsync, getTopic, getWithTTLOnly, getWithTTLOnlyAsync, put, put, putAll, putAllAsync, putAsync, putAsync, putIfAbsent, putIfAbsent, putIfAbsentAsync, randomEntriesAsync, randomKeysAsync, remainTimeToLive, remainTimeToLiveAsync, removeListener, scanIteratorAsync, scanKeyIteratorAsync, setMaxSize, setMaxSize, setMaxSizeAsync, sizeInMemoryAsync, trySetMaxSize, trySetMaxSize, trySetMaxSizeAsync, updateEntryExpiration, updateEntryExpirationAsyncMethods inherited from class org.redisson.RedissonMap
addAndGetAsync, addListener, addListenerAsync, checkKey, checkValue, compute, computeAsync, computeIfAbsent, computeIfAbsentAsync, computeIfPresent, computeIfPresentAsync, containsKey, containsKeyAsync, containsValue, encodeMapKeys, entryIterator, entrySet, entrySet, entrySet, entrySet, equals, fastPut, fastPutAsync, fastPutIfAbsent, fastPutIfAbsentAsync, fastPutIfExists, fastPutIfExistsAsync, fastRemove, fastRemoveAsync, fastReplace, fastReplaceAsync, get, getAll, getAllAsync, getAsync, getAsync, hashCode, hasNoLoader, hasNoWriter, isEmpty, keyIterator, keySet, keySet, keySet, keySet, loadAll, loadAll, loadAllMapAsync, loadValue, loadValue, 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, scanKeyIterator, size, sizeAsync, valueIterator, values, values, values, values, valueSizeMethods inherited from class org.redisson.RedissonObject
addListener, addListenerAsync, copy, copyAsync, delete, deleteAsync, dump, dumpAsync, encode, encode, encode, encode, encodeMapKey, encodeMapKey, encodeMapKeys, encodeMapValue, encodeMapValues, get, getCodec, getIdleTime, getIdleTimeAsync, getLockByMapKey, getLockByValue, getName, getRawName, getRawName, getServiceManager, getSubscribeService, isExists, map, migrate, move, prefixName, removeListenerAsync, rename, renameAsync, renamenx, renamenxAsync, restore, restore, restoreAndReplace, restoreAndReplace, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, setName, sizeInMemory, sizeInMemoryAsync, sizeInMemoryAsync, suffixName, toSeconds, toStream, touch, unlinkMethods 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, getExpireTimeAsyncMethods inherited from interface org.redisson.api.RMap
addListener, containsKey, containsValue, entrySet, entrySet, entrySet, entrySet, fastPut, fastPutIfAbsent, fastPutIfExists, fastRemove, fastReplace, get, getAll, keySet, keySet, keySet, keySet, loadAll, loadAll, 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, fastPutAsync, fastPutIfAbsentAsync, fastPutIfExistsAsync, fastRemoveAsync, fastReplaceAsync, getAllAsync, getAsync, mergeAsync, putAllAsync, putAllAsync, putAsync, putIfAbsentAsync, putIfExistsAsync, removeAsync, removeAsync, replaceAsync, replaceAsyncMethods inherited from interface org.redisson.api.RMapCacheAsync
sizeAsyncMethods inherited from interface org.redisson.api.RObject
copy, delete, dump, getCodec, getIdleTime, getName, isExists, migrate, move, rename, renamenx, restore, restore, restoreAndReplace, restoreAndReplace, sizeInMemory, touch, unlinkMethods inherited from interface org.redisson.api.RObjectAsync
copyAsync, dumpAsync, getIdleTimeAsync, removeListenerAsync, renameAsync, renamenxAsync, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync
-
Constructor Details
-
RedissonTransactionalMapCache
public RedissonTransactionalMapCache(CommandAsyncExecutor commandExecutor, String name, List<TransactionalOperation> operations, long timeout, AtomicBoolean executed, String transactionId) -
RedissonTransactionalMapCache
public RedissonTransactionalMapCache(Codec codec, CommandAsyncExecutor commandExecutor, String name, List<TransactionalOperation> operations, long timeout, AtomicBoolean executed, String transactionId)
-
-
Method Details
-
expireAsync
public RFuture<Boolean> expireAsync(long timeToLive, TimeUnit timeUnit, String param, String... keys) - Overrides:
expireAsyncin classRedissonMapCache<K,V>
-
expireAtAsync
- Overrides:
expireAtAsyncin classRedissonMapCache<K,V>
-
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- Overrides:
clearExpireAsyncin classRedissonMapCache<K,V> - Returns:
trueif the timeout was cleared andfalseif not
-
moveAsync
Description copied from interface:RObjectAsyncMove object to another database in async mode- Specified by:
moveAsyncin interfaceRObjectAsync- Overrides:
moveAsyncin classRedissonObject- Parameters:
database- - number of Redis database- Returns:
trueif key was movedfalseif not
-
migrateAsync
Description copied from interface:RObjectAsyncTransfer object from source Redis instance to destination Redis instance in async mode- Specified by:
migrateAsyncin interfaceRObjectAsync- Overrides:
migrateAsyncin classRedissonObject- Parameters:
host- - destination hostport- - destination portdatabase- - destination databasetimeout- - maximum idle time in any moment of the communication with the destination instance in milliseconds- Returns:
- void
-
touchAsync
Description copied from interface:RObjectAsyncUpdate the last access time of an object in async mode.- Specified by:
touchAsyncin interfaceRObjectAsync- Overrides:
touchAsyncin classRedissonObject- Returns:
trueif object was touched elsefalse
-
isExistsAsync
Description copied from interface:RObjectAsyncCheck object existence in async mode.- Specified by:
isExistsAsyncin interfaceRObjectAsync- Overrides:
isExistsAsyncin classRedissonObject- Returns:
trueif object exists andfalseotherwise
-
unlinkAsync
Description copied from interface:RObjectAsyncDelete the objects. Actual removal will happen later asynchronously.Requires Redis 4.0+
- Specified by:
unlinkAsyncin interfaceRObjectAsync- Overrides:
unlinkAsyncin classRedissonObject- Returns:
trueif it was exist and deleted elsefalse
-
deleteAsync
Description copied from interface:RObjectAsyncDelete object in async mode- Specified by:
deleteAsyncin interfaceRObjectAsync- Overrides:
deleteAsyncin classRedissonMapCache<K,V> - Returns:
trueif object was deletedfalseif not
-
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
-
fastPutOperationAsync
public RFuture<Boolean> fastPutOperationAsync(K key, V value, long ttl, TimeUnit ttlUnit, long maxIdleTime, TimeUnit maxIdleUnit) - Overrides:
fastPutOperationAsyncin classRedissonMapCache<K,V>
-
putOperationAsync
public RFuture<V> putOperationAsync(K key, V value, long ttlTimeout, long maxIdleTimeout, long maxIdleDelta, long ttlTimeoutDelta) - Overrides:
putOperationAsyncin classRedissonMapCache<K,V>
-
fastPutIfAbsentAsync
public RFuture<Boolean> fastPutIfAbsentAsync(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.
Works faster than usual
RMapCacheAsync.putIfAbsentAsync(Object, Object, long, TimeUnit, long, TimeUnit)as it not returns previous value.- Specified by:
fastPutIfAbsentAsyncin interfaceRMapCacheAsync<K,V> - Overrides:
fastPutIfAbsentAsyncin 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
-
remainTimeToLiveAsync
Description copied from interface:RExpirableAsyncRemaining time to live of Redisson object that has a timeout- 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.
-
setMaxSizeAsync
Description copied from interface:RMapCacheAsyncSets max size of the map and overrides current value. Superfluous elements are evicted using LRU algorithm by default.- Specified by:
setMaxSizeAsyncin interfaceRMapCacheAsync<K,V> - Overrides:
setMaxSizeAsyncin classRedissonMapCache<K,V> - Parameters:
maxSize- - max size- Returns:
- void
-
trySetMaxSizeAsync
Description copied from interface:RMapCacheAsyncTries to set max size of the map. Superfluous elements are evicted using LRU algorithm by default.- Specified by:
trySetMaxSizeAsyncin interfaceRMapCacheAsync<K,V> - Overrides:
trySetMaxSizeAsyncin classRedissonMapCache<K,V> - Parameters:
maxSize- - max size- Returns:
trueif max size has been successfully set, otherwisefalse.
-
mapReduce
Description copied from interface:RMapReturnsRMapReduceobject associated with this map -
scanIterator
public ScanResult<Map.Entry<Object,Object>> scanIterator(String name, RedisClient client, long startPos, String pattern, int count) - Overrides:
scanIteratorin classRedissonMap<K,V>
-
containsKeyAsync
Description copied from interface:RMapAsyncReturnstrueif this map contains map entry mapped by specifiedkey, otherwisefalse- Specified by:
containsKeyAsyncin interfaceRMapAsync<K,V> - Overrides:
containsKeyAsyncin classRedissonMap<K,V> - Parameters:
key- - map key- Returns:
trueif this map contains map entry mapped by specifiedkey, otherwisefalse
-
containsValueAsync
Description copied from interface:RMapAsyncReturnstrueif this map contains any map entry with specifiedvalue, otherwisefalse- Specified by:
containsValueAsyncin interfaceRMapAsync<K,V> - Overrides:
containsValueAsyncin classRedissonMapCache<K,V> - Parameters:
value- - map value- Returns:
trueif this map contains any map entry with specifiedvalue, otherwisefalse
-
addAndGetOperationAsync
- Overrides:
addAndGetOperationAsyncin classRedissonMapCache<K,V>
-
fastPutIfExistsOperationAsync
- Overrides:
fastPutIfExistsOperationAsyncin classRedissonMapCache<K,V>
-
putIfExistsOperationAsync
- Overrides:
putIfExistsOperationAsyncin classRedissonMapCache<K,V>
-
putIfAbsentOperationAsync
- Overrides:
putIfAbsentOperationAsyncin classRedissonMapCache<K,V>
-
putOperationAsync
- Overrides:
putOperationAsyncin classRedissonMapCache<K,V>
-
fastPutIfAbsentOperationAsync
- Overrides:
fastPutIfAbsentOperationAsyncin classRedissonMapCache<K,V>
-
fastPutOperationAsync
- Overrides:
fastPutOperationAsyncin classRedissonMapCache<K,V>
-
fastRemoveOperationAsync
- Overrides:
fastRemoveOperationAsyncin classRedissonMapCache<K,V>
-
valueSizeAsync
Description copied from interface:RMapAsyncReturns size of value mapped by key in bytes- Specified by:
valueSizeAsyncin interfaceRMapAsync<K,V> - Overrides:
valueSizeAsyncin classRedissonMap<K,V> - Parameters:
key- - map key- Returns:
- size of value
-
getOperationAsync
- Overrides:
getOperationAsyncin classRedissonMapCache<K,V>
-
readAllKeySetAsync
Description copied from interface:RMapAsyncRead all keys at once- Specified by:
readAllKeySetAsyncin interfaceRMapAsync<K,V> - Overrides:
readAllKeySetAsyncin classRedissonMapCache<K,V> - Returns:
- keys
-
readAllEntrySetAsync
Description copied from interface:RMapAsyncRead all map entries at once- Specified by:
readAllEntrySetAsyncin interfaceRMapAsync<K,V> - Overrides:
readAllEntrySetAsyncin classRedissonMapCache<K,V> - Returns:
- entries
-
readAllValuesAsync
Description copied from interface:RMapAsyncRead all values at once- Specified by:
readAllValuesAsyncin interfaceRMapAsync<K,V> - Overrides:
readAllValuesAsyncin classRedissonMapCache<K,V> - Returns:
- values
-
readAllMapAsync
Description copied from interface:RMapAsyncRead all map as local instance at once- Specified by:
readAllMapAsyncin interfaceRMapAsync<K,V> - Overrides:
readAllMapAsyncin classRedissonMapCache<K,V> - Returns:
- map
-
getAllOperationAsync
- Overrides:
getAllOperationAsyncin classRedissonMapCache<K,V>
-
removeOperationAsync
- Overrides:
removeOperationAsyncin classRedissonMapCache<K,V>
-
removeOperationAsync
- Overrides:
removeOperationAsyncin classRedissonMapCache<K,V>
-
putAllOperationAsync
- Overrides:
putAllOperationAsyncin classRedissonMapCache<K,V>
-
replaceOperationAsync
- Overrides:
replaceOperationAsyncin classRedissonMapCache<K,V>
-
replaceOperationAsync
- Overrides:
replaceOperationAsyncin classRedissonMapCache<K,V>
-
checkState
protected void checkState() -
loadAllAsync
Description copied from interface:RMapAsyncLoads all map entries to this Redis map usingMapLoader.- Specified by:
loadAllAsyncin interfaceRMapAsync<K,V> - Overrides:
loadAllAsyncin classRedissonMap<K,V> - Parameters:
replaceExistingValues- -trueif existed values should be replaced,falseotherwise.parallelism- - parallelism level, used to increase speed of process execution- Returns:
- void
-
loadAllAsync
public RFuture<Void> loadAllAsync(Set<? extends K> keys, boolean replaceExistingValues, int parallelism) Description copied from interface:RMapAsyncLoads map entries usingMapLoaderwhose keys are listed in definedkeysparameter.- Specified by:
loadAllAsyncin interfaceRMapAsync<K,V> - Overrides:
loadAllAsyncin classRedissonMap<K,V> - Parameters:
keys- - map keysreplaceExistingValues- -trueif existed values should be replaced,falseotherwise.parallelism- - parallelism level, used to increase speed of process execution- Returns:
- void
-
getFairLock
Description copied from interface:RMapReturnsRLockinstance associated with key- Specified by:
getFairLockin interfaceRMap<K,V> - Overrides:
getFairLockin classRedissonMap<K,V> - Parameters:
key- - map key- Returns:
- fairlock
-
getCountDownLatch
Description copied from interface:RMapReturnsRCountDownLatchinstance associated with key- Specified by:
getCountDownLatchin interfaceRMap<K,V> - Overrides:
getCountDownLatchin classRedissonMap<K,V> - Parameters:
key- - map key- Returns:
- countdownlatch
-
getPermitExpirableSemaphore
Description copied from interface:RMapReturnsRPermitExpirableSemaphoreinstance associated with key- Specified by:
getPermitExpirableSemaphorein interfaceRMap<K,V> - Overrides:
getPermitExpirableSemaphorein classRedissonMap<K,V> - Parameters:
key- - map key- Returns:
- permitExpirableSemaphore
-
getSemaphore
Description copied from interface:RMapReturnsRSemaphoreinstance associated with key- Specified by:
getSemaphorein interfaceRMap<K,V> - Overrides:
getSemaphorein classRedissonMap<K,V> - Parameters:
key- - map key- Returns:
- semaphore
-
getLock
Description copied from interface:RMapReturnsRLockinstance associated with key -
getReadWriteLock
Description copied from interface:RMapReturnsRReadWriteLockinstance associated with key- Specified by:
getReadWriteLockin interfaceRMap<K,V> - Overrides:
getReadWriteLockin classRedissonMap<K,V> - Parameters:
key- - map key- Returns:
- readWriteLock
-
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:RExpirableRemaining time to live of Redisson object that has a timeout- 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.
-
getExpireTime
public long getExpireTime()Description copied from interface:RExpirableExpiration time of Redisson object that has a timeoutRequires Redis 7.0.0 and higher.
- Specified by:
getExpireTimein interfaceRExpirable- Returns:
- expiration time
-
getExpireTimeAsync
Description copied from interface:RExpirableAsyncExpiration time of Redisson object that has a timeoutRequires Redis 7.0.0 and higher.
- Specified by:
getExpireTimeAsyncin interfaceRExpirableAsync- Returns:
- expiration time
-
clearExpireAsync
-