Class RedissonSet<V>
- Type Parameters:
V
- value
- 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
- Direct Known Subclasses:
RedissonTransactionalSet
Set
- Author:
- Nikita Koksharov
-
Field Summary
Fields inherited from class org.redisson.RedissonObject
codec, commandExecutor, name
-
Constructor Summary
ConstructorDescriptionRedissonSet
(Codec codec, CommandAsyncExecutor commandExecutor, String name, RedissonClient redisson) RedissonSet
(CommandAsyncExecutor commandExecutor, String name, RedissonClient redisson) -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
addAll
(Collection<? extends V> c) addAllAsync
(Collection<? extends V> c) Adds all elements contained in the specified collectionint
addAllCounted
(Collection<? extends V> c) Adds all elements contained in the specified collection.addAllCountedAsync
(Collection<? extends V> c) Adds all elements contained in the specified collection.Adds element into this collection.int
addListener
(ObjectListener listener) Adds object event listeneraddListenerAsync
(ObjectListener listener) Adds object event listenervoid
clear()
boolean
Clear an expire timeout or expire date for object.Clear an expire timeout or expire date for object in async mode.clearExpireAsync
(String... keys) boolean
boolean
containsAll
(Collection<?> c) containsAllAsync
(Collection<?> c) Returnstrue
if this collection contains all of the elements in the specified collection.Returnstrue
if this collection contains encoded state of the specified element.containsEach
(Collection<V> c) Check if each element is contained in the specified collection.Check if each element is contained in the specified collection.countIntersection
(int limit, String... names) Counts elements of set as a result of sets intersection with current set.countIntersection
(String... names) Counts elements of set as a result of sets intersection with current set.countIntersectionAsync
(int limit, String... names) Counts elements of set as a result of sets intersection with current set.countIntersectionAsync
(String... names) Counts elements of set as a result of sets intersection with current set.int
Diff sets specified by name and write to current set.Diff sets specified by name and write to current set.distributedIterator
(int count) Returns element iterator that can be shared across multiple applications.distributedIterator
(String pattern) Returns iterator over elements that match specified pattern.distributedIterator
(String iteratorName, String pattern, int count) Returns iterator over elements that match specified pattern.boolean
UseRExpirable.expire(Duration)
insteadboolean
Sets a timeout for this object.boolean
Sets 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.boolean
expireAt
(long timestamp) UseRExpirable.expire(Instant)
insteadboolean
UseRExpirable.expire(Instant)
insteadexpireAtAsync
(long timestamp) UseRExpirableAsync.expireAsync(Instant)
insteadexpireAtAsync
(long timestamp, String param, String... keys) expireAtAsync
(Date timestamp) UseRExpirableAsync.expireAsync(Instant)
insteadboolean
expireIfGreater
(Duration duration) Sets a timeout for this object only if it's greater than timeout set before.boolean
expireIfGreater
(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.boolean
expireIfLess
(Duration duration) Sets a timeout for this object only if it's less than timeout set before.boolean
expireIfLess
(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.boolean
expireIfNotSet
(Duration duration) Sets a timeout for this object only if it hasn't been set before.boolean
expireIfNotSet
(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.boolean
expireIfSet
(Duration duration) Sets a timeout for this object only if it has been already set.boolean
expireIfSet
(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) ReturnsRCountDownLatch
instance associated withvalue
long
Returns 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.getFairLock
(V value) ReturnsRLock
instance associated withvalue
Returns lock instance associated withvalue
getPermitExpirableSemaphore
(V value) ReturnsRPermitExpirableSemaphore
instance associated withvalue
getReadWriteLock
(V value) ReturnsRReadWriteLock
instance associated withvalue
getSemaphore
(V value) ReturnsRSemaphore
instance associated withvalue
int
intersection
(String... names) Intersection sets specified by name and write to current set.intersectionAsync
(String... names) Intersection sets specified by name and write to current set.boolean
isEmpty()
iterator()
iterator
(int count) Returns elements iterator fetches elements in a batch.Returns elements iterator.Returns elements iterator fetches elements in a batch.<KOut,
VOut>
RCollectionMapReduce<V, KOut, VOut> ReturnsRMapReduce
object associated with this objectboolean
Move a member from this set to the given destination set in.Move a member from this set to the given destination set in async mode.random()
Returns random elementrandom
(int count) Returns random elements from set limited bycount
Returns random element from set in async moderandomAsync
(int count) Returns random elements from set limited bycount
readAll()
Read all elements at onceRead all elements at onceDiff sets specified by name with current set.readDiffAsync
(String... names) Diff sets specified by name with current set.readIntersection
(String... names) Intersection sets specified by name with current set without current set state change.readIntersectionAsync
(String... names) Intersection sets specified by name with current set.<T> Collection
<T> Read data in sorted view<T> Collection
<T> Read data in sorted viewRead data in sorted viewRead data in sorted viewRead data in sorted viewRead data in sorted view<T> Collection
<T> readSortAlpha
(String byPattern, List<String> getPatterns, SortOrder order) Read data in sorted view lexicographically<T> Collection
<T> readSortAlpha
(String byPattern, List<String> getPatterns, SortOrder order, int offset, int count) Read data in sorted view lexicographicallyreadSortAlpha
(String byPattern, SortOrder order) Read data in sorted view lexicographicallyreadSortAlpha
(String byPattern, SortOrder order, int offset, int count) Read data in sorted view lexicographicallyreadSortAlpha
(SortOrder order) Read data in sorted view lexicographicallyreadSortAlpha
(SortOrder order, int offset, int count) Read data in sorted view lexicographically<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) Read data in sorted view<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
(String byPattern, SortOrder order, int offset, int count) Read data in sorted viewreadSortAsync
(SortOrder order) Read data in sorted viewreadSortAsync
(SortOrder order, int offset, int count) Read data in sorted viewUnion sets specified by name with current set without current set state change.readUnionAsync
(String... names) Union sets specified by name with current set.long
Returns remaining time of the object in milliseconds.Returns remaining time of the object in milliseconds.boolean
boolean
removeAll
(Collection<?> c) removeAllAsync
(Collection<?> c) Removes all of this collection's elements that are also contained in the specified collection.int
removeAllCounted
(Collection<? extends V> c) Removes all elements contained in the specified collection.removeAllCountedAsync
(Collection<? extends V> c) Removes all elements contained in the specified collection.Removes a single instance of the specified element from this collection, if it is present.void
removeListener
(int listenerId) Removes object event listenerremoveListenerAsync
(int listenerId) Removes object event listenerRemoves and returns random elementremoveRandom
(int amount) Removes and returns random elements limited byamount
Removes and returns random element from set in async moderemoveRandomAsync
(int amount) Removes and returns random elements from set in async modeboolean
retainAll
(Collection<?> c) retainAllAsync
(Collection<?> c) Retains only the elements in this collection that are contained in the specified collection.scanIterator
(String name, RedisClient client, String startPos, String pattern, int count) scanIteratorAsync
(String name, RedisClient client, String startPos, String pattern, int count) int
size()
Returns number of elements in this collection.int
Sort data and store todestName
listint
sortTo
(String destName, String byPattern, List<String> getPatterns, SortOrder order, int offset, int count) Sort data and store todestName
listint
Sort data and store todestName
listint
Sort data and store todestName
listint
Sort data and store todestName
listint
Sort data and store todestName
listSort data and store todestName
listsortToAsync
(String destName, String byPattern, List<String> getPatterns, SortOrder order, int offset, int count) Sort data and store todestName
listsortToAsync
(String destName, String byPattern, SortOrder order) Sort data and store todestName
listsortToAsync
(String destName, String byPattern, SortOrder order, int offset, int count) Sort data and store todestName
listsortToAsync
(String destName, SortOrder order) Sort data and store todestName
listsortToAsync
(String destName, SortOrder order, int offset, int count) Sort data and store todestName
liststream
(int count) Returns stream of elements fetches elements in a batch.Returns stream of elements.Returns stream of elements fetches elements in a batch.Object[]
toArray()
<T> T[]
toArray
(T[] a) toString()
boolean
Tries to add elements only if none of them in set.tryAddAsync
(V... values) Tries to add elements only if none of them in set.int
Union sets specified by name and write to current set.unionAsync
(String... names) Union sets specified by name and write to current set.Methods inherited from class org.redisson.RedissonObject
addListener, addListener, addListenerAsync, 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, unlinkAsync
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream
Methods inherited from interface org.redisson.api.RExpirable
clearExpire, expire, expire, expire, expireAt, expireAt, expireIfGreater, expireIfGreater, expireIfLess, expireIfLess, expireIfNotSet, expireIfNotSet, expireIfSet, expireIfSet, getExpireTime, remainTimeToLive
Methods inherited from interface org.redisson.api.RExpirableAsync
clearExpireAsync, expireAsync, expireAsync, expireAsync, expireAtAsync, expireAtAsync, expireIfGreaterAsync, expireIfGreaterAsync, expireIfLessAsync, expireIfLessAsync, expireIfNotSetAsync, expireIfNotSetAsync, expireIfSetAsync, expireIfSetAsync, getExpireTimeAsync, remainTimeToLiveAsync
Methods 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, unlink
Methods 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
Methods inherited from interface java.util.Set
equals, hashCode, spliterator
-
Constructor Details
-
RedissonSet
-
RedissonSet
public RedissonSet(Codec codec, CommandAsyncExecutor commandExecutor, String name, RedissonClient redisson)
-
-
Method Details
-
mapReduce
Description copied from interface:RSet
ReturnsRMapReduce
object associated with this object -
size
public int size() -
sizeAsync
Description copied from interface:RCollectionAsync
Returns number of elements in this collection.- Specified by:
sizeAsync
in interfaceRCollectionAsync<V>
- Returns:
- size of collection
-
isEmpty
public boolean isEmpty() -
contains
-
containsAsync
Description copied from interface:RCollectionAsync
Returnstrue
if this collection contains encoded state of the specified element.- Specified by:
containsAsync
in interfaceRCollectionAsync<V>
- Parameters:
o
- element whose presence in this collection is to be tested- Returns:
true
if this collection contains the specified element andfalse
otherwise
-
scanIterator
public ScanResult<Object> scanIterator(String name, RedisClient client, String startPos, String pattern, int count) - Specified by:
scanIterator
in interfaceScanIterator
-
iterator
Description copied from interface:RSet
Returns elements iterator fetches elements in a batch. Batch size is defined bycount
param. -
iterator
Description copied from interface:RSet
Returns elements iterator. Ifpattern
is not null then only elements match this pattern are loaded. -
iterator
Description copied from interface:RSet
Returns elements iterator fetches elements in a batch. Batch size is defined bycount
param. If pattern is not null then only elements match this pattern are loaded. -
distributedIterator
Description copied from interface:RSet
Returns iterator over elements that match specified pattern. Iterator can be shared across multiple applications. Creating multiple iterators on the same object with this method will result in a single shared iterator. See RSet.distributedIterator(String, String, int) for creating different iterators.- Specified by:
distributedIterator
in interfaceRSet<V>
- Parameters:
pattern
- element pattern- Returns:
- shared elements iterator
-
distributedIterator
Description copied from interface:RSet
Returns element iterator that can be shared across multiple applications. Creating multiple iterators on the same object with this method will result in a single shared iterator. See RSet.distributedIterator(String, String, int) for creating different iterators.- Specified by:
distributedIterator
in interfaceRSet<V>
- Parameters:
count
- batch size- Returns:
- shared elements iterator
-
distributedIterator
Description copied from interface:RSet
Returns iterator over elements that match specified pattern. Iterator can be shared across multiple applications. Creating multiple iterators on the same object with this method will result in a single shared iterator. Iterator name must be resolved to the same hash slot as set name.- Specified by:
distributedIterator
in interfaceRSet<V>
- Parameters:
iteratorName
- redis object name to which cursor will be savedpattern
- element patterncount
- batch size- Returns:
- shared elements iterator
-
iterator
-
readAllAsync
Description copied from interface:RSetAsync
Read all elements at once- Specified by:
readAllAsync
in interfaceRSetAsync<V>
- Returns:
- values
-
readAll
Description copied from interface:RSet
Read all elements at once -
toArray
-
toArray
public <T> T[] toArray(T[] a) -
add
-
addAsync
Description copied from interface:RCollectionAsync
Adds element into this collection.- Specified by:
addAsync
in interfaceRCollectionAsync<V>
- Parameters:
e
- - element to add- Returns:
true
if an element was added andfalse
if it is already present
-
removeRandom
Description copied from interface:RSet
Removes and returns random element- Specified by:
removeRandom
in interfaceRSet<V>
- Returns:
- random element
-
removeRandomAsync
Description copied from interface:RSetAsync
Removes and returns random element from set in async mode- Specified by:
removeRandomAsync
in interfaceRSetAsync<V>
- Returns:
- value
-
removeRandom
Description copied from interface:RSet
Removes and returns random elements limited byamount
- Specified by:
removeRandom
in interfaceRSet<V>
- Parameters:
amount
- of random elements- Returns:
- random elements
-
removeRandomAsync
Description copied from interface:RSetAsync
Removes and returns random elements from set in async mode- Specified by:
removeRandomAsync
in interfaceRSetAsync<V>
- Parameters:
amount
- of random values- Returns:
- random values
-
random
Description copied from interface:RSet
Returns random element -
randomAsync
Description copied from interface:RSetAsync
Returns random element from set in async mode- Specified by:
randomAsync
in interfaceRSetAsync<V>
- Returns:
- value
-
random
Description copied from interface:RSet
Returns random elements from set limited bycount
-
randomAsync
Description copied from interface:RSetAsync
Returns random elements from set limited bycount
- Specified by:
randomAsync
in interfaceRSetAsync<V>
- Parameters:
count
- - values amount to return- Returns:
- value
-
removeAsync
Description copied from interface:RCollectionAsync
Removes a single instance of the specified element from this collection, if it is present.- Specified by:
removeAsync
in interfaceRCollectionAsync<V>
- Parameters:
o
- element to be removed from this collection, if present- Returns:
true
if an element was removed as a result of this call
-
remove
- Specified by:
remove
in interfaceCollection<V>
- Specified by:
remove
in interfaceScanIterator
- Specified by:
remove
in interfaceSet<V>
-
moveAsync
Description copied from interface:RSetAsync
Move a member from this set to the given destination set in async mode. -
move
Description copied from interface:RSet
Move a member from this set to the given destination set in. -
containsAll
- Specified by:
containsAll
in interfaceCollection<V>
- Specified by:
containsAll
in interfaceSet<V>
-
containsAllAsync
Description copied from interface:RCollectionAsync
Returnstrue
if this collection contains all of the elements in the specified collection.- Specified by:
containsAllAsync
in interfaceRCollectionAsync<V>
- Parameters:
c
- collection to be checked for containment in this collection- Returns:
true
if this collection contains all of the elements in the specified collection
-
addAll
-
addAllAsync
Description copied from interface:RCollectionAsync
Adds all elements contained in the specified collection- Specified by:
addAllAsync
in interfaceRCollectionAsync<V>
- Parameters:
c
- - collection of elements to add- Returns:
true
if at least one element was added andfalse
if all elements are already present
-
addAllCountedAsync
Description copied from interface:RSetAsync
Adds all elements contained in the specified collection. Returns number of added elements.- Specified by:
addAllCountedAsync
in interfaceRSetAsync<V>
- Parameters:
c
- - collection of elements to add- Returns:
- number of added elements
-
addAllCounted
Description copied from interface:RSet
Adds all elements contained in the specified collection. Returns number of added elements.- Specified by:
addAllCounted
in interfaceRSet<V>
- Parameters:
c
- - collection of elements to add- Returns:
- number of added elements
-
retainAll
-
retainAllAsync
Description copied from interface:RCollectionAsync
Retains only the elements in this collection that are contained in the specified collection.- Specified by:
retainAllAsync
in interfaceRCollectionAsync<V>
- Parameters:
c
- collection containing elements to be retained in this collection- Returns:
true
if this collection changed as a result of the call
-
removeAllAsync
Description copied from interface:RCollectionAsync
Removes all of this collection's elements that are also contained in the specified collection.- Specified by:
removeAllAsync
in interfaceRCollectionAsync<V>
- Parameters:
c
- collection containing elements to be removed from this collection- Returns:
true
if this collection changed as a result of the call
-
removeAllCounted
Description copied from interface:RSet
Removes all elements contained in the specified collection. Returns number of removed elements.- Specified by:
removeAllCounted
in interfaceRSet<V>
- Parameters:
c
- - collection of elements to add- Returns:
- number of removed elements
-
removeAllCountedAsync
Description copied from interface:RSetAsync
Removes all elements contained in the specified collection. Returns number of removed elements.- Specified by:
removeAllCountedAsync
in interfaceRSetAsync<V>
- Parameters:
c
- - collection of elements to add- Returns:
- number of removed elements
-
containsEachAsync
Description copied from interface:RSetAsync
Check if each element is contained in the specified collection. Returns contained elements.Requires Redis 6.2.0 and higher.
- Specified by:
containsEachAsync
in interfaceRSetAsync<V>
- Parameters:
c
- - collection to check- Returns:
- contained elements
-
removeAll
-
union
Description copied from interface:RSet
Union sets specified by name and write to current set. If current set already exists, it is overwritten. -
unionAsync
Description copied from interface:RSetAsync
Union sets specified by name and write to current set. If current set already exists, it is overwritten.- Specified by:
unionAsync
in interfaceRSetAsync<V>
- Parameters:
names
- - name of sets- Returns:
- size of union
-
readUnion
Description copied from interface:RSet
Union sets specified by name with current set without current set state change. -
readUnionAsync
Description copied from interface:RSetAsync
Union sets specified by name with current set. Without current set state change.- Specified by:
readUnionAsync
in interfaceRSetAsync<V>
- Parameters:
names
- - name of sets- Returns:
- values
-
diff
Description copied from interface:RSet
Diff sets specified by name and write to current set. If current set already exists, it is overwritten. -
diffAsync
Description copied from interface:RSetAsync
Diff sets specified by name and write to current set. If current set already exists, it is overwritten. -
readDiff
Description copied from interface:RSet
Diff sets specified by name with current set. Without current set state change. -
readDiffAsync
Description copied from interface:RSetAsync
Diff sets specified by name with current set. Without current set state change.- Specified by:
readDiffAsync
in interfaceRSetAsync<V>
- Parameters:
names
- - name of sets- Returns:
- values
-
intersection
Description copied from interface:RSet
Intersection sets specified by name and write to current set. If current set already exists, it is overwritten.- Specified by:
intersection
in interfaceRSet<V>
- Parameters:
names
- - name of sets- Returns:
- size of intersection
-
intersectionAsync
Description copied from interface:RSetAsync
Intersection sets specified by name and write to current set. If current set already exists, it is overwritten.- Specified by:
intersectionAsync
in interfaceRSetAsync<V>
- Parameters:
names
- - name of sets- Returns:
- size of intersection
-
readIntersection
Description copied from interface:RSet
Intersection sets specified by name with current set without current set state change.- Specified by:
readIntersection
in interfaceRSet<V>
- Parameters:
names
- - name of sets- Returns:
- values
-
readIntersectionAsync
Description copied from interface:RSetAsync
Intersection sets specified by name with current set. Without current set state change.- Specified by:
readIntersectionAsync
in interfaceRSetAsync<V>
- Parameters:
names
- - name of sets- Returns:
- values
-
countIntersection
Description copied from interface:RSet
Counts elements of set as a result of sets intersection with current set.Requires Redis 7.0.0 and higher.
- Specified by:
countIntersection
in interfaceRSet<V>
- Parameters:
names
- - name of sets- Returns:
- amount of elements
-
countIntersectionAsync
Description copied from interface:RSetAsync
Counts elements of set as a result of sets intersection with current set.Requires Redis 7.0.0 and higher.
- Specified by:
countIntersectionAsync
in interfaceRSetAsync<V>
- Parameters:
names
- - name of sets- Returns:
- amount of elements
-
countIntersection
Description copied from interface:RSet
Counts elements of set as a result of sets intersection with current set.Requires Redis 7.0.0 and higher.
- Specified by:
countIntersection
in interfaceRSet<V>
- Parameters:
limit
- - sets intersection limitnames
- - name of sets- Returns:
- amount of elements
-
countIntersectionAsync
Description copied from interface:RSetAsync
Counts elements of set as a result of sets intersection with current set.Requires Redis 7.0.0 and higher.
- Specified by:
countIntersectionAsync
in interfaceRSetAsync<V>
- Parameters:
limit
- - sets intersection limitnames
- - name of sets- Returns:
- amount of elements
-
clear
public void clear() -
toString
-
readSort
Description copied from interface:RSortable
Read data in sorted view -
readSortAsync
Description copied from interface:RSortableAsync
Read data in sorted view- Specified by:
readSortAsync
in interfaceRSortableAsync<V>
- Parameters:
order
- for sorted data- Returns:
- sorted collection
-
readSort
Description copied from interface:RSortable
Read data in sorted view -
readSortAsync
Description copied from interface:RSortableAsync
Read data in sorted view- Specified by:
readSortAsync
in interfaceRSortableAsync<V>
- Parameters:
order
- for sorted dataoffset
- of sorted datacount
- of sorted data- Returns:
- sorted collection
-
readSort
Description copied from interface:RSortable
Read data in sorted view -
readSortAsync
Description copied from interface:RSortableAsync
Read data in sorted view- Specified by:
readSortAsync
in interfaceRSortableAsync<V>
- Parameters:
byPattern
- that is used to generate the keys that are used for sortingorder
- for sorted data- Returns:
- sorted collection
-
readSort
Description copied from interface:RSortable
Read data in sorted view -
readSortAsync
Description copied from interface:RSortableAsync
Read data in sorted view- Specified by:
readSortAsync
in interfaceRSortableAsync<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
-
readSort
Description copied from interface:RSortable
Read data in sorted view -
readSortAsync
public <T> RFuture<Collection<T>> readSortAsync(String byPattern, List<String> getPatterns, SortOrder order) Description copied from interface:RSortableAsync
Read data in sorted view- Specified by:
readSortAsync
in interfaceRSortableAsync<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
-
readSort
public <T> Collection<T> readSort(String byPattern, List<String> getPatterns, SortOrder order, int offset, int count) Description copied from interface:RSortable
Read data in sorted view- Specified by:
readSort
in interfaceRSortable<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
-
readSortAsync
public <T> RFuture<Collection<T>> readSortAsync(String byPattern, List<String> getPatterns, SortOrder order, int offset, int count) Description copied from interface:RSortableAsync
Read data in sorted view- Specified by:
readSortAsync
in interfaceRSortableAsync<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
-
readSortAlpha
Description copied from interface:RSortable
Read data in sorted view lexicographically- Specified by:
readSortAlpha
in interfaceRSortable<V>
- Parameters:
order
- for sorted data- Returns:
- sorted collection lexicographically
-
readSortAlpha
Description copied from interface:RSortable
Read data in sorted view lexicographically- Specified by:
readSortAlpha
in interfaceRSortable<V>
- Parameters:
order
- for sorted dataoffset
- of sorted datacount
- of sorted data- Returns:
- sorted collection lexicographically
-
readSortAlpha
Description copied from interface:RSortable
Read data in sorted view lexicographically- Specified by:
readSortAlpha
in interfaceRSortable<V>
- Parameters:
byPattern
- that is used to generate the keys that are used for sortingorder
- for sorted data- Returns:
- sorted collection lexicographically
-
readSortAlpha
Description copied from interface:RSortable
Read data in sorted view lexicographically- Specified by:
readSortAlpha
in interfaceRSortable<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
-
readSortAlpha
Description copied from interface:RSortable
Read data in sorted view lexicographically- Specified by:
readSortAlpha
in interfaceRSortable<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
-
readSortAlpha
public <T> Collection<T> readSortAlpha(String byPattern, List<String> getPatterns, SortOrder order, int offset, int count) Description copied from interface:RSortable
Read data in sorted view lexicographically- Specified by:
readSortAlpha
in interfaceRSortable<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
-
readSortAlphaAsync
Description copied from interface:RSortableAsync
Read data in sorted view lexicographically- Specified by:
readSortAlphaAsync
in interfaceRSortableAsync<V>
- Parameters:
order
- for sorted data- Returns:
- sorted collection lexicographically
-
readSortAlphaAsync
Description copied from interface:RSortableAsync
Read data in sorted view lexicographically- Specified by:
readSortAlphaAsync
in interfaceRSortableAsync<V>
- Parameters:
order
- for sorted dataoffset
- of sorted datacount
- of sorted data- Returns:
- sorted collection lexicographically
-
readSortAlphaAsync
Description copied from interface:RSortableAsync
Read data in sorted view lexicographically- Specified by:
readSortAlphaAsync
in interfaceRSortableAsync<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:RSortableAsync
Read data in sorted view lexicographically- Specified by:
readSortAlphaAsync
in interfaceRSortableAsync<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:RSortableAsync
Read data in sorted view lexicographically- Specified by:
readSortAlphaAsync
in interfaceRSortableAsync<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:RSortableAsync
Read data in sorted view lexicographically- Specified by:
readSortAlphaAsync
in interfaceRSortableAsync<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
-
sortTo
Description copied from interface:RSortable
Sort data and store todestName
list -
sortToAsync
Description copied from interface:RSortableAsync
Sort data and store todestName
list- Specified by:
sortToAsync
in interfaceRSortableAsync<V>
- Parameters:
destName
- list object destinationorder
- for sorted data- Returns:
- length of sorted data
-
sortTo
Description copied from interface:RSortable
Sort data and store todestName
list -
sortToAsync
Description copied from interface:RSortableAsync
Sort data and store todestName
list- Specified by:
sortToAsync
in interfaceRSortableAsync<V>
- Parameters:
destName
- list object destinationorder
- for sorted dataoffset
- of sorted datacount
- of sorted data- Returns:
- length of sorted data
-
sortTo
Description copied from interface:RSortable
Sort data and store todestName
list -
sortTo
Description copied from interface:RSortable
Sort data and store todestName
list -
sortToAsync
Description copied from interface:RSortableAsync
Sort data and store todestName
list- Specified by:
sortToAsync
in interfaceRSortableAsync<V>
- Parameters:
destName
- list object destinationbyPattern
- that is used to generate the keys that are used for sortingorder
- for sorted data- Returns:
- length of sorted data
-
sortToAsync
public RFuture<Integer> sortToAsync(String destName, String byPattern, SortOrder order, int offset, int count) Description copied from interface:RSortableAsync
Sort data and store todestName
list- Specified by:
sortToAsync
in interfaceRSortableAsync<V>
- Parameters:
destName
- list object destinationbyPattern
- that is used to generate the keys that are used for sortingorder
- for sorted dataoffset
- of sorted datacount
- of sorted data- Returns:
- length of sorted data
-
sortTo
Description copied from interface:RSortable
Sort data and store todestName
list -
sortToAsync
public RFuture<Integer> sortToAsync(String destName, String byPattern, List<String> getPatterns, SortOrder order) Description copied from interface:RSortableAsync
Sort data and store todestName
list- Specified by:
sortToAsync
in interfaceRSortableAsync<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 data- Returns:
- length of sorted data
-
sortTo
public int sortTo(String destName, String byPattern, List<String> getPatterns, SortOrder order, int offset, int count) Description copied from interface:RSortable
Sort data and store todestName
list- Specified by:
sortTo
in interfaceRSortable<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
-
sortToAsync
public RFuture<Integer> sortToAsync(String destName, String byPattern, List<String> getPatterns, SortOrder order, int offset, int count) Description copied from interface:RSortableAsync
Sort data and store todestName
list- Specified by:
sortToAsync
in interfaceRSortableAsync<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
-
tryAdd
Description copied from interface:RSet
Tries to add elements only if none of them in set. -
containsEach
Description copied from interface:RSet
Check if each element is contained in the specified collection. Returns contained elements.Requires Redis 6.2.0 and higher.
- Specified by:
containsEach
in interfaceRSet<V>
- Parameters:
c
- - collection to check- Returns:
- contained elements
-
tryAddAsync
Description copied from interface:RSetAsync
Tries to add elements only if none of them in set.- Specified by:
tryAddAsync
in interfaceRSetAsync<V>
- Parameters:
values
- - values to add- Returns:
true
if elements successfully added, otherwisefalse
.
-
getPermitExpirableSemaphore
Description copied from interface:RSet
ReturnsRPermitExpirableSemaphore
instance associated withvalue
- Specified by:
getPermitExpirableSemaphore
in interfaceRSet<V>
- Parameters:
value
- - set value- Returns:
- RPermitExpirableSemaphore object
-
getSemaphore
Description copied from interface:RSet
ReturnsRSemaphore
instance associated withvalue
- Specified by:
getSemaphore
in interfaceRSet<V>
- Parameters:
value
- - set value- Returns:
- RSemaphore object
-
getCountDownLatch
Description copied from interface:RSet
ReturnsRCountDownLatch
instance associated withvalue
- Specified by:
getCountDownLatch
in interfaceRSet<V>
- Parameters:
value
- - set value- Returns:
- RCountDownLatch object
-
getFairLock
Description copied from interface:RSet
ReturnsRLock
instance associated withvalue
- Specified by:
getFairLock
in interfaceRSet<V>
- Parameters:
value
- - set value- Returns:
- RLock object
-
getLock
Description copied from interface:RSet
Returns lock instance associated withvalue
-
getReadWriteLock
Description copied from interface:RSet
ReturnsRReadWriteLock
instance associated withvalue
- Specified by:
getReadWriteLock
in interfaceRSet<V>
- Parameters:
value
- - set value- Returns:
- RReadWriteLock object
-
scanIteratorAsync
public RFuture<ScanResult<Object>> scanIteratorAsync(String name, RedisClient client, String startPos, String pattern, int count) - Specified by:
scanIteratorAsync
in interfaceScanIterator
-
stream
Description copied from interface:RSet
Returns stream of elements fetches elements in a batch. Batch size is defined bycount
param. -
stream
Description copied from interface:RSet
Returns stream of elements fetches elements in a batch. Batch size is defined bycount
param. If pattern is not null then only elements match this pattern are loaded. -
stream
Description copied from interface:RSet
Returns stream of elements. If pattern is not null then only elements match this pattern are loaded. -
addListener
Description copied from interface:RObject
Adds object event listener- Specified by:
addListener
in interfaceRObject
- Specified by:
addListener
in interfaceRSet<V>
- Overrides:
addListener
in classRedissonObject
- Parameters:
listener
- - object event listener- Returns:
- listener id
- See Also:
-
addListenerAsync
Description copied from interface:RObjectAsync
Adds object event listener- Specified by:
addListenerAsync
in interfaceRObjectAsync
- Specified by:
addListenerAsync
in interfaceRSetAsync<V>
- Overrides:
addListenerAsync
in classRedissonObject
- Parameters:
listener
- - object event listener- Returns:
- listener id
- See Also:
-
removeListener
public void removeListener(int listenerId) Description copied from interface:RObject
Removes object event listener- Specified by:
removeListener
in interfaceRObject
- Overrides:
removeListener
in classRedissonObject
- Parameters:
listenerId
- - listener id
-
removeListenerAsync
Description copied from interface:RObjectAsync
Removes object event listener- Specified by:
removeListenerAsync
in interfaceRObjectAsync
- Overrides:
removeListenerAsync
in classRedissonObject
- Parameters:
listenerId
- - listener id
-
expire
Description copied from interface:RExpirable
UseRExpirable.expire(Duration)
instead- Specified by:
expire
in interfaceRExpirable
- Parameters:
timeToLive
- - timeout before object will be deletedtimeUnit
- - timeout time unit- Returns:
true
if the timeout was set andfalse
if not
-
expireAsync
Description copied from interface:RExpirableAsync
UseRExpirableAsync.expireAsync(Duration)
instead- Specified by:
expireAsync
in interfaceRExpirableAsync
- Parameters:
timeToLive
- - timeout before object will be deletedtimeUnit
- - timeout time unit- Returns:
true
if the timeout was set andfalse
if not
-
expireAt
public boolean expireAt(long timestamp) Description copied from interface:RExpirable
UseRExpirable.expire(Instant)
instead- Specified by:
expireAt
in interfaceRExpirable
- Parameters:
timestamp
- - expire date in milliseconds (Unix timestamp)- Returns:
true
if the timeout was set andfalse
if not
-
expireAtAsync
Description copied from interface:RExpirableAsync
UseRExpirableAsync.expireAsync(Instant)
instead- Specified by:
expireAtAsync
in interfaceRExpirableAsync
- Parameters:
timestamp
- - expire date in milliseconds (Unix timestamp)- Returns:
true
if the timeout was set andfalse
if not
-
expire
Description copied from interface:RExpirable
Sets an expiration date for this object. When expire date comes the key will automatically be deleted.- Specified by:
expire
in interfaceRExpirable
- Parameters:
instant
- expire date- Returns:
true
if the timeout was set andfalse
if not
-
expireIfSet
Description copied from interface:RExpirable
Sets 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:
expireIfSet
in interfaceRExpirable
- Parameters:
time
- expire date- Returns:
true
if the timeout was set andfalse
if not
-
expireIfSetAsync
Description copied from interface:RExpirableAsync
Sets 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:
expireIfSetAsync
in interfaceRExpirableAsync
- Parameters:
time
- expire date- Returns:
true
if the timeout was set andfalse
if not
-
expireIfNotSet
Description copied from interface:RExpirable
Sets 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:
expireIfNotSet
in interfaceRExpirable
- Parameters:
time
- expire date- Returns:
true
if the timeout was set andfalse
if not
-
expireIfNotSetAsync
Description copied from interface:RExpirableAsync
Sets 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:
expireIfNotSetAsync
in interfaceRExpirableAsync
- Parameters:
time
- expire date- Returns:
true
if the timeout was set andfalse
if not
-
expireIfGreater
Description copied from interface:RExpirable
Sets 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:
expireIfGreater
in interfaceRExpirable
- Parameters:
time
- expire date- Returns:
true
if the timeout was set andfalse
if not
-
expireIfGreaterAsync
Description copied from interface:RExpirableAsync
Sets 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:
expireIfGreaterAsync
in interfaceRExpirableAsync
- Parameters:
time
- expire date- Returns:
true
if the timeout was set andfalse
if not
-
expireIfLess
Description copied from interface:RExpirable
Sets 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:
expireIfLess
in interfaceRExpirable
- Parameters:
time
- expire date- Returns:
true
if the timeout was set andfalse
if not
-
expireIfLessAsync
Description copied from interface:RExpirableAsync
Sets 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:
expireIfLessAsync
in interfaceRExpirableAsync
- Parameters:
time
- expire date- Returns:
true
if the timeout was set andfalse
if not
-
expireAsync
Description copied from interface:RExpirableAsync
Set an expire date for object. When expire date comes the key will automatically be deleted.- Specified by:
expireAsync
in interfaceRExpirableAsync
- Parameters:
instant
- - expire date- Returns:
true
if the timeout was set andfalse
if not
-
expire
Description copied from interface:RExpirable
Sets a timeout for this object. After the timeout has expired, the key will automatically be deleted.- Specified by:
expire
in interfaceRExpirable
- Parameters:
duration
- timeout before object will be deleted- Returns:
true
if the timeout was set andfalse
if not
-
expireAsync
Description copied from interface:RExpirableAsync
Set a timeout for object. After the timeout has expired, the key will automatically be deleted.- Specified by:
expireAsync
in interfaceRExpirableAsync
- Parameters:
duration
- timeout before object will be deleted- Returns:
true
if the timeout was set andfalse
if not
-
expireAt
Description copied from interface:RExpirable
UseRExpirable.expire(Instant)
instead- Specified by:
expireAt
in interfaceRExpirable
- Parameters:
timestamp
- - expire date- Returns:
true
if the timeout was set andfalse
if not
-
expireAtAsync
Description copied from interface:RExpirableAsync
UseRExpirableAsync.expireAsync(Instant)
instead- Specified by:
expireAtAsync
in interfaceRExpirableAsync
- Parameters:
timestamp
- - expire date- Returns:
true
if the timeout was set andfalse
if not
-
expireIfSet
Description copied from interface:RExpirable
Sets 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:
expireIfSet
in interfaceRExpirable
- Parameters:
duration
- timeout before object will be deleted- Returns:
true
if the timeout was set andfalse
if not
-
expireIfSetAsync
Description copied from interface:RExpirableAsync
Sets 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:
expireIfSetAsync
in interfaceRExpirableAsync
- Parameters:
duration
- timeout before object will be deleted- Returns:
true
if the timeout was set andfalse
if not
-
expireIfNotSet
Description copied from interface:RExpirable
Sets 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:
expireIfNotSet
in interfaceRExpirable
- Parameters:
duration
- timeout before object will be deleted- Returns:
true
if the timeout was set andfalse
if not
-
expireIfNotSetAsync
Description copied from interface:RExpirableAsync
Sets 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:
expireIfNotSetAsync
in interfaceRExpirableAsync
- Parameters:
duration
- timeout before object will be deleted- Returns:
true
if the timeout was set andfalse
if not
-
expireIfGreater
Description copied from interface:RExpirable
Sets 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:
expireIfGreater
in interfaceRExpirable
- Parameters:
duration
- timeout before object will be deleted- Returns:
true
if the timeout was set andfalse
if not
-
expireIfGreaterAsync
Description copied from interface:RExpirableAsync
Sets 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:
expireIfGreaterAsync
in interfaceRExpirableAsync
- Parameters:
duration
- timeout before object will be deleted- Returns:
true
if the timeout was set andfalse
if not
-
expireIfLess
Description copied from interface:RExpirable
Sets 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:
expireIfLess
in interfaceRExpirable
- Parameters:
duration
- timeout before object will be deleted- Returns:
true
if the timeout was set andfalse
if not
-
expireIfLessAsync
Description copied from interface:RExpirableAsync
Sets 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:
expireIfLessAsync
in interfaceRExpirableAsync
- Parameters:
duration
- timeout before object will be deleted- Returns:
true
if the timeout was set andfalse
if not
-
clearExpire
public boolean clearExpire()Description copied from interface:RExpirable
Clear an expire timeout or expire date for object.- Specified by:
clearExpire
in interfaceRExpirable
- Returns:
true
if timeout was removedfalse
if object does not exist or does not have an associated timeout
-
clearExpireAsync
Description copied from interface:RExpirableAsync
Clear an expire timeout or expire date for object in async mode. Object will not be deleted.- Specified by:
clearExpireAsync
in interfaceRExpirableAsync
- Returns:
true
if the timeout was cleared andfalse
if not
-
remainTimeToLive
public long remainTimeToLive()Description copied from interface:RExpirable
Returns remaining time of the object in milliseconds.- Specified by:
remainTimeToLive
in 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:RExpirableAsync
Returns remaining time of the object in milliseconds.- Specified by:
remainTimeToLiveAsync
in 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:RExpirable
Returns expiration time of the object as the absolute Unix expiration timestamp in milliseconds.Requires Redis 7.0.0 and higher.
- Specified by:
getExpireTime
in 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:RExpirableAsync
Returns expiration time of the object as the absolute Unix expiration timestamp in milliseconds.Requires Redis 7.0.0 and higher.
- Specified by:
getExpireTimeAsync
in 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
-