Package org.redisson
Class RedissonSetMultimapValues<V>
java.lang.Object
org.redisson.RedissonObject
org.redisson.RedissonSetMultimapValues<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>>
Set based Multimap Cache values holder
- Author:
- Nikita Koksharov
-
Field Summary
Fields inherited from class org.redisson.RedissonObject
codec, commandExecutor, name
-
Constructor Summary
ConstructorDescriptionRedissonSetMultimapValues
(Codec codec, CommandAsyncExecutor commandExecutor, String name, String timeoutSetName, Object key) -
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.void
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.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.Delete object in async modeint
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) expireIfGreaterAsync
(Instant time) 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) expireIfLessAsync
(Instant time) 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) expireIfNotSetAsync
(Instant time) 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) expireIfSetAsync
(Instant time) getCountDownLatch
(V value) ReturnsRCountDownLatch
instance associated withvalue
long
Expiration time of Redisson object that has a timeoutExpiration time of Redisson object that has a timeoutgetFairLock
(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
Remaining time to live of Redisson object that has a timeoutRemaining time to live of Redisson object that has a timeoutboolean
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.Removes 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 moderenameAsync
(String newName) Rename current object key tonewName
in async moderenamenxAsync
(String newName) Rename current object key tonewName
in async mode only if new key is not existsboolean
retainAll
(Collection<?> c) retainAllAsync
(Collection<?> c) Retains only the elements in this collection that are contained in the specified collection.int
size()
Returns number of elements in this collection.Returns bytes amount used by object in Redis memory.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) 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, copy, copyAsync, delete, deleteAsync, dump, dumpAsync, encode, encode, encode, encode, encodeMapKey, encodeMapKeys, encodeMapValue, encodeMapValues, get, getCodec, getIdleTime, getIdleTimeAsync, getLockByMapKey, getLockByValue, getName, getRawName, getRawName, isExists, isExistsAsync, migrate, migrateAsync, move, moveAsync, prefixName, removeListener, removeListenerAsync, rename, renamenx, restore, restore, restoreAndReplace, restoreAndReplace, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, setName, sizeInMemory, sizeInMemoryAsync, sizeInMemoryAsync, suffixName, toSeconds, toStream, touch, touchAsync, unlink, unlinkAsync
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
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
expireAsync, expireAsync, expireAsync, expireAtAsync, expireAtAsync, expireIfGreaterAsync, expireIfGreaterAsync, expireIfLessAsync, expireIfLessAsync, expireIfNotSetAsync, expireIfNotSetAsync, expireIfSetAsync, expireIfSetAsync, getExpireTimeAsync
Methods 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, unlink
Methods inherited from interface org.redisson.api.RObjectAsync
addListenerAsync, copyAsync, dumpAsync, getIdleTimeAsync, isExistsAsync, migrateAsync, moveAsync, removeListenerAsync, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, touchAsync, unlinkAsync
Methods inherited from interface java.util.Set
equals, hashCode, spliterator
-
Constructor Details
-
RedissonSetMultimapValues
public RedissonSetMultimapValues(Codec codec, CommandAsyncExecutor commandExecutor, String name, String timeoutSetName, Object key)
-
-
Method Details
-
size
public int size() -
mapReduce
Description copied from interface:RSet
ReturnsRMapReduce
object associated with this object -
tryAdd
Description copied from interface:RSet
Tries to add elements only if none of them in set. -
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
.
-
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
-
expireAsync
-
expireAtAsync
-
remainTimeToLiveAsync
Description copied from interface:RExpirableAsync
Remaining time to live of Redisson object that has a timeout- 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.
-
renameAsync
Description copied from interface:RObjectAsync
Rename current object key tonewName
in async mode- Specified by:
renameAsync
in interfaceRObjectAsync
- Overrides:
renameAsync
in classRedissonObject
- Parameters:
newName
- - new name of object- Returns:
- void
-
renamenxAsync
Description copied from interface:RObjectAsync
Rename current object key tonewName
in async mode only if new key is not exists- Specified by:
renamenxAsync
in interfaceRObjectAsync
- Overrides:
renamenxAsync
in classRedissonObject
- Parameters:
newName
- - new name of object- Returns:
true
if object has been renamed successfully andfalse
otherwise
-
deleteAsync
Description copied from interface:RObjectAsync
Delete object in async mode- Specified by:
deleteAsync
in interfaceRObjectAsync
- Overrides:
deleteAsync
in classRedissonObject
- Returns:
true
if object was deletedfalse
if not
-
sizeInMemoryAsync
Description copied from interface:RObjectAsync
Returns bytes amount used by object in Redis memory.- Specified by:
sizeInMemoryAsync
in interfaceRObjectAsync
- Overrides:
sizeInMemoryAsync
in classRedissonObject
- Returns:
- size in bytes
-
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
-
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. -
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
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. -
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
-
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
-
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
-
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
-
getCountDownLatch
Description copied from interface:RSet
ReturnsRCountDownLatch
instance associated withvalue
- Specified by:
getCountDownLatch
in interfaceRSet<V>
- Parameters:
value
- - set value- Returns:
- RCountDownLatch object
-
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
-
getFairLock
Description copied from interface:RSet
ReturnsRLock
instance associated withvalue
- Specified by:
getFairLock
in interfaceRSet<V>
- Parameters:
value
- - set value- Returns:
- RLock object
-
getReadWriteLock
Description copied from interface:RSet
ReturnsRReadWriteLock
instance associated withvalue
- Specified by:
getReadWriteLock
in interfaceRSet<V>
- Parameters:
value
- - set value- Returns:
- RReadWriteLock object
-
getLock
Description copied from interface:RSet
Returns lock instance associated withvalue
-
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
-
clear
public void clear() -
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
-
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 -
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 -
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
-
sortTo
Description copied from interface:RSortable
Sort data and store todestName
list -
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
-
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. -
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
- Specified by:
expireIfSetAsync
in interfaceRExpirableAsync
-
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
- Specified by:
expireIfNotSetAsync
in interfaceRExpirableAsync
-
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
- Specified by:
expireIfGreaterAsync
in interfaceRExpirableAsync
-
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
- Specified by:
expireIfLessAsync
in interfaceRExpirableAsync
-
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
- Specified by:
expireIfSetAsync
in interfaceRExpirableAsync
-
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
- Specified by:
expireIfNotSetAsync
in interfaceRExpirableAsync
-
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
- Specified by:
expireIfGreaterAsync
in interfaceRExpirableAsync
-
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
- Specified by:
expireIfLessAsync
in interfaceRExpirableAsync
-
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
-
remainTimeToLive
public long remainTimeToLive()Description copied from interface:RExpirable
Remaining time to live of Redisson object that has a timeout- 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.
-
getExpireTime
public long getExpireTime()Description copied from interface:RExpirable
Expiration time of Redisson object that has a timeoutRequires Redis 7.0.0 and higher.
- Specified by:
getExpireTime
in interfaceRExpirable
- Returns:
- expiration time
-
getExpireTimeAsync
Description copied from interface:RExpirableAsync
Expiration time of Redisson object that has a timeoutRequires Redis 7.0.0 and higher.
- Specified by:
getExpireTimeAsync
in interfaceRExpirableAsync
- Returns:
- expiration time
-
clearExpireAsync
-