Package org.redisson.transaction
Class RedissonTransactionalSet<V>
java.lang.Object
org.redisson.RedissonObject
org.redisson.RedissonSet<V>
org.redisson.transaction.RedissonTransactionalSet<V>
- Type Parameters:
V- value type
- All Implemented Interfaces:
Iterable<V>,Collection<V>,Set<V>,RCollectionAsync<V>,RExpirable,RExpirableAsync,RObject,RObjectAsync,RSet<V>,RSetAsync<V>,RSortable<Set<V>>,RSortableAsync<Set<V>>,ScanIterator
- Author:
- Nikita Koksharov
-
Field Summary
Fields inherited from class org.redisson.RedissonObject
codec, commandExecutor, name -
Constructor Summary
ConstructorsConstructorDescriptionRedissonTransactionalSet(Codec codec, CommandAsyncExecutor commandExecutor, String name, List<TransactionalOperation> operations, long timeout, AtomicBoolean executed, String transactionId) RedissonTransactionalSet(CommandAsyncExecutor commandExecutor, String name, List<TransactionalOperation> operations, long timeout, AtomicBoolean executed, String transactionId) -
Method Summary
Modifier and TypeMethodDescriptionaddAllAsync(Collection<? extends V> c) Adds all elements contained in the specified collectionAdds element into this collection.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) Returnstrueif this collection contains encoded state of the specified element.Delete object in async modeDiff sets specified by name and write to current set.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)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.getCountDownLatch(V value) ReturnsRCountDownLatchinstance associated withvaluelongExpiration time of Redisson object that has a timeoutExpiration time of Redisson object that has a timeoutgetFairLock(V value) ReturnsRLockinstance associated withvalueReturns lock instance associated withvaluegetPermitExpirableSemaphore(V value) ReturnsRPermitExpirableSemaphoreinstance associated withvaluegetReadWriteLock(V value) ReturnsRReadWriteLockinstance associated withvaluegetSemaphore(V value) ReturnsRSemaphoreinstance associated withvalueintersectionAsync(String... names) Intersection sets specified by name and write to current set.<KOut,VOut>
RCollectionMapReduce<V,KOut, VOut> ReturnsRMapReduceobject associated with this objectmigrateAsync(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 modeMove a member from this set to the given destination set in async mode.Read all elements at oncereadDiffAsync(String... names) Diff sets specified by name with current set.readIntersectionAsync(String... names) Intersection sets specified by name with current set.<T> RFuture<Collection<T>>readSortAlphaAsync(String byPattern, List<String> getPatterns, SortOrder order) Read data in sorted view lexicographically<T> RFuture<Collection<T>>readSortAlphaAsync(String byPattern, List<String> getPatterns, SortOrder order, int offset, int count) Read data in sorted view lexicographicallyreadSortAlphaAsync(String byPattern, SortOrder order) Read data in sorted view lexicographicallyreadSortAlphaAsync(String byPattern, SortOrder order, int offset, int count) Read data in sorted view lexicographicallyreadSortAlphaAsync(SortOrder order) Read data in sorted view lexicographicallyreadSortAlphaAsync(SortOrder order, int offset, int count) Read data in sorted view lexicographically<T> RFuture<Collection<T>>readSortAsync(String byPattern, List<String> getPatterns, SortOrder order, int offset, int count) Read data in sorted viewreadSortAsync(String byPattern, SortOrder order) Read data in sorted viewreadSortAsync(SortOrder order) Read data in sorted viewreadSortAsync(SortOrder order, int offset, int count) Read data in sorted viewreadUnionAsync(String... names) Union sets specified by name with current set.longRemaining time to live of Redisson object that has a timeoutRemaining time to live of Redisson object that has a timeoutremoveAllAsync(Collection<?> c) Removes all of this collection's elements that are also contained in the specified collection.Removes a single instance of the specified element from this collection, if it is present.Removes and returns random element from set in async moderemoveRandomAsync(int amount) Removes and returns random elements from set in async moderetainAllAsync(Collection<?> c) Retains only the elements in this collection that are contained in the specified collection.scanIterator(String name, RedisClient client, long startPos, String pattern, int count) sortToAsync(String destName, String byPattern, List<String> getPatterns, SortOrder order, int offset, int count) Sort data and store todestNamelistUpdate the last access time of an object in async mode.unionAsync(String... names) Union sets specified by name and write to current set.Delete the objects.Methods inherited from class org.redisson.RedissonSet
add, addAll, addAllCounted, addAllCountedAsync, clear, contains, containsAll, containsAllAsync, countIntersection, countIntersection, countIntersectionAsync, countIntersectionAsync, diff, distributedIterator, distributedIterator, distributedIterator, intersection, isEmpty, iterator, iterator, iterator, iterator, move, random, random, randomAsync, randomAsync, readAll, readDiff, readIntersection, readSort, readSort, readSort, readSort, readSort, readSort, readSortAlpha, readSortAlpha, readSortAlpha, readSortAlpha, readSortAlpha, readSortAlpha, readSortAsync, readSortAsync, readUnion, remove, removeAll, removeAllCounted, removeAllCountedAsync, removeRandom, removeRandom, retainAll, scanIteratorAsync, size, sizeAsync, sortTo, sortTo, sortTo, sortTo, sortTo, sortTo, sortToAsync, sortToAsync, sortToAsync, sortToAsync, sortToAsync, stream, stream, stream, toArray, toArray, toString, tryAdd, tryAddAsync, unionMethods inherited from class org.redisson.RedissonObject
addListener, addListener, addListenerAsync, 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, isExists, isExistsAsync, migrate, move, prefixName, removeListener, removeListenerAsync, rename, renameAsync, renamenx, renamenxAsync, restore, restore, restoreAndReplace, restoreAndReplace, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, setName, sizeInMemory, sizeInMemoryAsync, sizeInMemoryAsync, sizeInMemoryAsync, suffixName, toSeconds, toStream, touch, unlinkMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods 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.RObject
addListener, copy, delete, dump, getCodec, getIdleTime, getName, isExists, migrate, move, removeListener, rename, renamenx, restore, restore, restoreAndReplace, restoreAndReplace, sizeInMemory, touch, unlinkMethods inherited from interface org.redisson.api.RObjectAsync
addListenerAsync, copyAsync, dumpAsync, getIdleTimeAsync, isExistsAsync, removeListenerAsync, renameAsync, renamenxAsync, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, sizeInMemoryAsyncMethods inherited from interface java.util.Set
equals, hashCode, spliterator
-
Constructor Details
-
RedissonTransactionalSet
public RedissonTransactionalSet(CommandAsyncExecutor commandExecutor, String name, List<TransactionalOperation> operations, long timeout, AtomicBoolean executed, String transactionId) -
RedissonTransactionalSet
public RedissonTransactionalSet(Codec codec, CommandAsyncExecutor commandExecutor, String name, List<TransactionalOperation> operations, long timeout, AtomicBoolean executed, String transactionId)
-
-
Method Details
-
expireAsync
-
expireAtAsync
-
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
-
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
-
mapReduce
Description copied from interface:RSetReturnsRMapReduceobject associated with this object -
scanIterator
public ScanResult<Object> scanIterator(String name, RedisClient client, long startPos, String pattern, int count) - Specified by:
scanIteratorin interfaceScanIterator- Overrides:
scanIteratorin classRedissonSet<V>
-
getFairLock
Description copied from interface:RSetReturnsRLockinstance associated withvalue- Specified by:
getFairLockin interfaceRSet<V>- Overrides:
getFairLockin classRedissonSet<V>- Parameters:
value- - set value- Returns:
- RLock object
-
getCountDownLatch
Description copied from interface:RSetReturnsRCountDownLatchinstance associated withvalue- Specified by:
getCountDownLatchin interfaceRSet<V>- Overrides:
getCountDownLatchin classRedissonSet<V>- Parameters:
value- - set value- Returns:
- RCountDownLatch object
-
getPermitExpirableSemaphore
Description copied from interface:RSetReturnsRPermitExpirableSemaphoreinstance associated withvalue- Specified by:
getPermitExpirableSemaphorein interfaceRSet<V>- Overrides:
getPermitExpirableSemaphorein classRedissonSet<V>- Parameters:
value- - set value- Returns:
- RPermitExpirableSemaphore object
-
getSemaphore
Description copied from interface:RSetReturnsRSemaphoreinstance associated withvalue- Specified by:
getSemaphorein interfaceRSet<V>- Overrides:
getSemaphorein classRedissonSet<V>- Parameters:
value- - set value- Returns:
- RSemaphore object
-
getLock
Description copied from interface:RSetReturns lock instance associated withvalue -
getReadWriteLock
Description copied from interface:RSetReturnsRReadWriteLockinstance associated withvalue- Specified by:
getReadWriteLockin interfaceRSet<V>- Overrides:
getReadWriteLockin classRedissonSet<V>- Parameters:
value- - set value- Returns:
- RReadWriteLock object
-
containsAsync
Description copied from interface:RCollectionAsyncReturnstrueif this collection contains encoded state of the specified element.- Specified by:
containsAsyncin interfaceRCollectionAsync<V>- Overrides:
containsAsyncin classRedissonSet<V>- Parameters:
o- element whose presence in this collection is to be tested- Returns:
trueif this collection contains the specified element andfalseotherwise
-
readAllAsync
Description copied from interface:RSetAsyncRead all elements at once- Specified by:
readAllAsyncin interfaceRSetAsync<V>- Overrides:
readAllAsyncin classRedissonSet<V>- Returns:
- values
-
addAsync
Description copied from interface:RCollectionAsyncAdds element into this collection.- Specified by:
addAsyncin interfaceRCollectionAsync<V>- Overrides:
addAsyncin classRedissonSet<V>- Parameters:
e- - element to add- Returns:
trueif an element was added andfalseif it is already present
-
removeRandomAsync
Description copied from interface:RSetAsyncRemoves and returns random element from set in async mode- Specified by:
removeRandomAsyncin interfaceRSetAsync<V>- Overrides:
removeRandomAsyncin classRedissonSet<V>- Returns:
- value
-
removeRandomAsync
Description copied from interface:RSetAsyncRemoves and returns random elements from set in async mode- Specified by:
removeRandomAsyncin interfaceRSetAsync<V>- Overrides:
removeRandomAsyncin classRedissonSet<V>- Parameters:
amount- of random values- Returns:
- random values
-
removeAsync
Description copied from interface:RCollectionAsyncRemoves a single instance of the specified element from this collection, if it is present.- Specified by:
removeAsyncin interfaceRCollectionAsync<V>- Overrides:
removeAsyncin classRedissonSet<V>- Parameters:
o- element to be removed from this collection, if present- Returns:
trueif an element was removed as a result of this call
-
moveAsync
Description copied from interface:RSetAsyncMove a member from this set to the given destination set in async mode. -
addAllAsync
Description copied from interface:RCollectionAsyncAdds all elements contained in the specified collection- Specified by:
addAllAsyncin interfaceRCollectionAsync<V>- Overrides:
addAllAsyncin classRedissonSet<V>- Parameters:
c- - collection of elements to add- Returns:
trueif at least one element was added andfalseif all elements are already present
-
retainAllAsync
Description copied from interface:RCollectionAsyncRetains only the elements in this collection that are contained in the specified collection.- Specified by:
retainAllAsyncin interfaceRCollectionAsync<V>- Overrides:
retainAllAsyncin classRedissonSet<V>- Parameters:
c- collection containing elements to be retained in this collection- Returns:
trueif this collection changed as a result of the call
-
removeAllAsync
Description copied from interface:RCollectionAsyncRemoves all of this collection's elements that are also contained in the specified collection.- Specified by:
removeAllAsyncin interfaceRCollectionAsync<V>- Overrides:
removeAllAsyncin classRedissonSet<V>- Parameters:
c- collection containing elements to be removed from this collection- Returns:
trueif this collection changed as a result of the call
-
unionAsync
Description copied from interface:RSetAsyncUnion sets specified by name and write to current set. If current set already exists, it is overwritten.- Specified by:
unionAsyncin interfaceRSetAsync<V>- Overrides:
unionAsyncin classRedissonSet<V>- Parameters:
names- - name of sets- Returns:
- size of union
-
diffAsync
Description copied from interface:RSetAsyncDiff sets specified by name and write to current set. If current set already exists, it is overwritten. -
intersectionAsync
Description copied from interface:RSetAsyncIntersection sets specified by name and write to current set. If current set already exists, it is overwritten.- Specified by:
intersectionAsyncin interfaceRSetAsync<V>- Overrides:
intersectionAsyncin classRedissonSet<V>- Parameters:
names- - name of sets- Returns:
- size of intersection
-
readSortAsync
Description copied from interface:RSortableAsyncRead data in sorted view- Specified by:
readSortAsyncin interfaceRSortableAsync<V>- Overrides:
readSortAsyncin classRedissonSet<V>- Parameters:
order- for sorted data- Returns:
- sorted collection
-
readSortAsync
Description copied from interface:RSortableAsyncRead data in sorted view- Specified by:
readSortAsyncin interfaceRSortableAsync<V>- Overrides:
readSortAsyncin classRedissonSet<V>- Parameters:
order- for sorted dataoffset- of sorted datacount- of sorted data- Returns:
- sorted collection
-
readSortAsync
Description copied from interface:RSortableAsyncRead data in sorted view- Specified by:
readSortAsyncin interfaceRSortableAsync<V>- Overrides:
readSortAsyncin classRedissonSet<V>- Parameters:
byPattern- that is used to generate the keys that are used for sortingorder- for sorted data- Returns:
- sorted collection
-
readSortAsync
public <T> RFuture<Collection<T>> readSortAsync(String byPattern, List<String> getPatterns, SortOrder order, int offset, int count) Description copied from interface:RSortableAsyncRead data in sorted view- Specified by:
readSortAsyncin interfaceRSortableAsync<V>- Overrides:
readSortAsyncin classRedissonSet<V>- Type Parameters:
T- object type- Parameters:
byPattern- that is used to generate the keys that are used for sortinggetPatterns- that is used to load values by keys in sorted vieworder- for sorted dataoffset- of sorted datacount- of sorted data- Returns:
- sorted collection
-
readSortAlphaAsync
Description copied from interface:RSortableAsyncRead data in sorted view lexicographically- Specified by:
readSortAlphaAsyncin interfaceRSortableAsync<V>- Overrides:
readSortAlphaAsyncin classRedissonSet<V>- Parameters:
order- for sorted data- Returns:
- sorted collection lexicographically
-
readSortAlphaAsync
Description copied from interface:RSortableAsyncRead data in sorted view lexicographically- Specified by:
readSortAlphaAsyncin interfaceRSortableAsync<V>- Overrides:
readSortAlphaAsyncin classRedissonSet<V>- Parameters:
order- for sorted dataoffset- of sorted datacount- of sorted data- Returns:
- sorted collection lexicographically
-
readSortAlphaAsync
Description copied from interface:RSortableAsyncRead data in sorted view lexicographically- Specified by:
readSortAlphaAsyncin interfaceRSortableAsync<V>- Overrides:
readSortAlphaAsyncin classRedissonSet<V>- Parameters:
byPattern- that is used to generate the keys that are used for sortingorder- for sorted data- Returns:
- sorted collection lexicographically
-
readSortAlphaAsync
Description copied from interface:RSortableAsyncRead data in sorted view lexicographically- Specified by:
readSortAlphaAsyncin interfaceRSortableAsync<V>- Overrides:
readSortAlphaAsyncin classRedissonSet<V>- Parameters:
byPattern- that is used to generate the keys that are used for sortingorder- for sorted dataoffset- of sorted datacount- of sorted data- Returns:
- sorted collection lexicographically
-
readSortAlphaAsync
public <T> RFuture<Collection<T>> readSortAlphaAsync(String byPattern, List<String> getPatterns, SortOrder order) Description copied from interface:RSortableAsyncRead data in sorted view lexicographically- Specified by:
readSortAlphaAsyncin interfaceRSortableAsync<V>- Overrides:
readSortAlphaAsyncin classRedissonSet<V>- Type Parameters:
T- object type- Parameters:
byPattern- that is used to generate the keys that are used for sortinggetPatterns- that is used to load values by keys in sorted vieworder- for sorted data- Returns:
- sorted collection lexicographically
-
readSortAlphaAsync
public <T> RFuture<Collection<T>> readSortAlphaAsync(String byPattern, List<String> getPatterns, SortOrder order, int offset, int count) Description copied from interface:RSortableAsyncRead data in sorted view lexicographically- Specified by:
readSortAlphaAsyncin interfaceRSortableAsync<V>- Overrides:
readSortAlphaAsyncin classRedissonSet<V>- Type Parameters:
T- object type- Parameters:
byPattern- that is used to generate the keys that are used for sortinggetPatterns- that is used to load values by keys in sorted vieworder- for sorted dataoffset- of sorted datacount- of sorted data- Returns:
- sorted collection lexicographically
-
sortToAsync
public RFuture<Integer> sortToAsync(String destName, String byPattern, List<String> getPatterns, SortOrder order, int offset, int count) Description copied from interface:RSortableAsyncSort data and store todestNamelist- Specified by:
sortToAsyncin interfaceRSortableAsync<V>- Overrides:
sortToAsyncin classRedissonSet<V>- Parameters:
destName- list object destinationbyPattern- that is used to generate the keys that are used for sortinggetPatterns- that is used to load values by keys in sorted vieworder- for sorted dataoffset- of sorted datacount- of sorted data- Returns:
- length of sorted data
-
readUnionAsync
Description copied from interface:RSetAsyncUnion sets specified by name with current set. Without current set state change.- Specified by:
readUnionAsyncin interfaceRSetAsync<V>- Overrides:
readUnionAsyncin classRedissonSet<V>- Parameters:
names- - name of sets- Returns:
- values
-
readDiffAsync
Description copied from interface:RSetAsyncDiff sets specified by name with current set. Without current set state change.- Specified by:
readDiffAsyncin interfaceRSetAsync<V>- Overrides:
readDiffAsyncin classRedissonSet<V>- Parameters:
names- - name of sets- Returns:
- values
-
readIntersectionAsync
Description copied from interface:RSetAsyncIntersection sets specified by name with current set. Without current set state change.- Specified by:
readIntersectionAsyncin interfaceRSetAsync<V>- Overrides:
readIntersectionAsyncin classRedissonSet<V>- Parameters:
names- - name of sets- Returns:
- values
-
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
-
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
-
deleteAsync
Description copied from interface:RObjectAsyncDelete object in async mode- Specified by:
deleteAsyncin interfaceRObjectAsync- Overrides:
deleteAsyncin classRedissonObject- Returns:
trueif object was deletedfalseif not
-
checkState
protected void checkState() -
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.
-
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.
-
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
-