Interface BoundZSetOperations<K,V>
- All Superinterfaces:
BoundKeyOperations<K>
ZSet (or SortedSet) operations bound to a certain key.
- Author:
- Costin Leau, Christoph Strobl, Mark Paluch, Wongoo (望哥), Andrey Shlykov
-
Method Summary
Modifier and TypeMethodDescriptionadd
(Set<ZSetOperations.TypedTuple<V>> tuples) Addtuples
to a sorted set at the bound key, or update itsscore
if it already exists.Addvalue
to a sorted set at the bound key, or update itsscore
if it already exists.addIfAbsent
(Set<ZSetOperations.TypedTuple<V>> tuples) Addtuples
to a sorted set at the bound key if it does not already exists.addIfAbsent
(V value, double score) Addvalue
to a sorted set at the bound key if it does not already exists.count
(double min, double max) Count number of elements within sorted set with scores betweenmin
andmax
.difference
(Collection<K> otherKeys) Diff sortedsets
.difference
(K otherKey) Diff sortedsets
.differenceAndStore
(Collection<K> otherKeys, K destKey) Diff sortedsets
and store result in destinationdestKey
.default Long
differenceAndStore
(K otherKey, K destKey) Diff sortedsets
and store result in destinationdestKey
.differenceWithScores
(Collection<K> otherKeys) Diff sortedsets
.default Set<ZSetOperations.TypedTuple<V>>
differenceWithScores
(K otherKey) Diff sortedsets
.distinctRandomMembers
(long count) Getcount
distinct random elements from set at the bound key.distinctRandomMembersWithScore
(long count) Getcount
distinct random elements with their score from set at the bound key.incrementScore
(V value, double delta) Increment the score of element withvalue
in sorted set byincrement
.intersect
(Collection<K> otherKeys) Intersect sortedsets
.Intersect sortedsets
.intersectAndStore
(Collection<K> otherKeys, K destKey) Intersect sorted sets at the bound key andotherKeys
and store result in destinationdestKey
.intersectAndStore
(Collection<K> otherKeys, K destKey, Aggregate aggregate) Intersect sorted sets at the bound key andotherKeys
and store result in destinationdestKey
.intersectAndStore
(Collection<K> otherKeys, K destKey, Aggregate aggregate, Weights weights) Intersect sorted sets at the bound key andotherKeys
and store result in destinationdestKey
.intersectAndStore
(K otherKey, K destKey) Intersect sorted sets at the bound key andotherKey
and store result in destinationdestKey
.intersectWithScores
(Collection<K> otherKeys) Intersect sortedsets
.intersectWithScores
(Collection<K> otherKeys, Aggregate aggregate, Weights weights) Intersect sortedsets
.default Set<ZSetOperations.TypedTuple<V>>
intersectWithScores
(K otherKey) Intersect sortedsets
.Count number of elements within sorted set with value betweenRange.getLowerBound()
andRange.getUpperBound()
applying lexicographical ordering.default Long
lexCount
(RedisZSetCommands.Range range) Deprecated, for removal: This API element is subject to removal in a future version.since 3.0.popMax()
Remove and return the value with its score having the highest score from sorted set at the bound key.popMax
(long count) Remove and returncount
values with their score having the highest score from sorted set at the bound key.Remove and return the value with its score having the highest score from sorted set at the bound key.default ZSetOperations.TypedTuple<V>
Remove and return the value with its score having the highest score from sorted set at the bound key.popMin()
Remove and return the value with its score having the lowest score from sorted set at the bound key.popMin
(long count) Remove and returncount
values with their score having the lowest score from sorted set at the bound key.Remove and return the value with its score having the lowest score from sorted set at the bound key.default ZSetOperations.TypedTuple<V>
Remove and return the value with its score having the lowest score from sorted set at the bound key.Get random element from set at the bound key.randomMembers
(long count) Getcount
random elements from set at the bound key.randomMembersWithScore
(long count) Getcount
random elements with their score from set at the bound key.Get random element with its score from set at the bound key.range
(long start, long end) Get elements betweenstart
andend
from sorted set.default Long
rangeAndStoreByLex
(K dstKey, Range<String> range) Store all elements atdstKey
with lexicographical ordering from ZSET at the bound key with a value betweenRange.getLowerBound()
andRange.getUpperBound()
.rangeAndStoreByLex
(K dstKey, Range<String> range, Limit limit) Store n elements atdstKey
, where n =Limit.getCount()
, starting atLimit.getOffset()
with lexicographical ordering from ZSET at the bound key with a value betweenRange.getLowerBound()
andRange.getUpperBound()
.default Long
rangeAndStoreByScore
(K dstKey, Range<? extends Number> range) Store all elements atdstKey
with ordering by score from ZSET at the bound key with a score betweenRange.getLowerBound()
andRange.getUpperBound()
.rangeAndStoreByScore
(K dstKey, Range<? extends Number> range, Limit limit) Store n elements atdstKey
, where n =Limit.getCount()
, starting atLimit.getOffset()
with ordering by score from ZSET at the bound key with a score betweenRange.getLowerBound()
andRange.getUpperBound()
.rangeByLex
(Range<String> range) Get all elements with lexicographical ordering with a value betweenRange.getLowerBound()
andRange.getUpperBound()
.rangeByLex
(Range<String> range, Limit limit) Get all elements n elements, where n =Limit.getCount()
, starting atLimit.getOffset()
with lexicographical ordering having a value betweenRange.getLowerBound()
andRange.getUpperBound()
.Deprecated, for removal: This API element is subject to removal in a future version.since 3.0.rangeByLex
(RedisZSetCommands.Range range, Limit limit) Deprecated, for removal: This API element is subject to removal in a future version.since 3.0.rangeByScore
(double min, double max) Get elements where score is betweenmin
andmax
from sorted set.rangeByScoreWithScores
(double min, double max) rangeWithScores
(long start, long end) Determine the index of element withvalue
in a sorted set.Removevalues
from sorted set.removeRange
(long start, long end) Remove elements in range betweenstart
andend
from sorted set with the bound key.removeRangeByLex
(Range<String> range) Remove elements inRange
from sorted set with the bound key.default Long
Deprecated, for removal: This API element is subject to removal in a future version.since 3.0.removeRangeByScore
(double min, double max) Remove elements with scores betweenmin
andmax
from sorted set with the bound key.reverseRange
(long start, long end) Get elements in range fromstart
toend
from sorted set ordered from high to low.default Long
reverseRangeAndStoreByLex
(K dstKey, Range<String> range) Store all elements atdstKey
with reverse lexicographical ordering from ZSET at the bound key with a value betweenRange.getLowerBound()
andRange.getUpperBound()
.reverseRangeAndStoreByLex
(K dstKey, Range<String> range, Limit limit) Store n elements atdstKey
, where n =Limit.getCount()
, starting atLimit.getOffset()
with reverse lexicographical ordering from ZSET at the bound key with a value betweenRange.getLowerBound()
andRange.getUpperBound()
.default Long
reverseRangeAndStoreByScore
(K dstKey, Range<? extends Number> range) Store all elements atdstKey
with reverse ordering by score from ZSET at the bound key with a score betweenRange.getLowerBound()
andRange.getUpperBound()
.reverseRangeAndStoreByScore
(K dstKey, Range<? extends Number> range, Limit limit) Store n elements atdstKey
, where n =Limit.getCount()
, starting atLimit.getOffset()
with reverse ordering by score from ZSET at the bound key with a score betweenRange.getLowerBound()
andRange.getUpperBound()
.reverseRangeByLex
(Range<String> range) Get all elements with reverse lexicographical ordering with a value betweenRange.getLowerBound()
andRange.getUpperBound()
.reverseRangeByLex
(Range<String> range, Limit limit) Get all elements n elements, where n =Limit.getCount()
, starting atLimit.getOffset()
with reverse lexicographical ordering having a value betweenRange.getLowerBound()
andRange.getUpperBound()
.Deprecated, for removal: This API element is subject to removal in a future version.since 3.0.reverseRangeByLex
(RedisZSetCommands.Range range, Limit limit) Deprecated, for removal: This API element is subject to removal in a future version.since 3.0.reverseRangeByScore
(double min, double max) Get elements where score is betweenmin
andmax
from sorted set ordered from high to low.reverseRangeByScoreWithScores
(double min, double max) reverseRangeWithScores
(long start, long end) Determine the index of element withvalue
in a sorted set when scored high to low.scan
(ScanOptions options) Use aCursor
to iterate over entries in zset at the bound key.Get the score of element withvalue
from sorted set with key the bound key.Get the scores of elements withvalues
from sorted set with key the bound key.size()
Returns the number of elements of the sorted set stored with given the bound key.union
(Collection<K> otherKeys) Union sortedsets
.Union sortedsets
.unionAndStore
(Collection<K> otherKeys, K destKey) Union sorted sets at the bound key andotherKeys
and store result in destinationdestKey
.unionAndStore
(Collection<K> otherKeys, K destKey, Aggregate aggregate) Union sorted sets at the bound key andotherKeys
and store result in destinationdestKey
.unionAndStore
(Collection<K> otherKeys, K destKey, Aggregate aggregate, Weights weights) Union sorted sets at the bound key andotherKeys
and store result in destinationdestKey
.unionAndStore
(K otherKey, K destKey) Union sorted sets at the bound key andotherKeys
and store result in destinationdestKey
.unionWithScores
(Collection<K> otherKeys) Union sortedsets
.default Set<ZSetOperations.TypedTuple<V>>
unionWithScores
(Collection<K> otherKeys, Aggregate aggregate) Union sorted sets at the bound key andotherKeys
.unionWithScores
(Collection<K> otherKeys, Aggregate aggregate, Weights weights) Union sortedsets
.default Set<ZSetOperations.TypedTuple<V>>
unionWithScores
(K otherKey) Union sortedsets
.zCard()
Get the size of sorted set with the bound key.
-
Method Details
-
add
Addvalue
to a sorted set at the bound key, or update itsscore
if it already exists.- Parameters:
value
- the value.score
- the score.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
addIfAbsent
Addvalue
to a sorted set at the bound key if it does not already exists.- Parameters:
value
- the value.score
- the score.- Returns:
- null when used in pipeline / transaction.
- Since:
- 2.5
- See Also:
-
add
Addtuples
to a sorted set at the bound key, or update itsscore
if it already exists.- Parameters:
tuples
- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
addIfAbsent
Addtuples
to a sorted set at the bound key if it does not already exists.- Parameters:
tuples
- must not be null.- Returns:
- null when used in pipeline / transaction.
- Since:
- 2.5
- See Also:
-
remove
Removevalues
from sorted set. Return number of removed elements.- Parameters:
values
- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
incrementScore
Increment the score of element withvalue
in sorted set byincrement
.- Parameters:
value
- the value.delta
- the delta to add. Can be negative.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
randomMember
V randomMember()Get random element from set at the bound key.- Returns:
- null when used in pipeline / transaction.
- Since:
- 2.6
- See Also:
-
distinctRandomMembers
Getcount
distinct random elements from set at the bound key.- Parameters:
count
- number of members to return.- Returns:
- empty
Set
ifkey
does not exist. - Throws:
IllegalArgumentException
- if count is negative.- Since:
- 2.6
- See Also:
-
randomMembers
Getcount
random elements from set at the bound key.- Parameters:
count
- number of members to return.- Returns:
- empty
List
ifkey
does not exist or null when used in pipeline / transaction. - Throws:
IllegalArgumentException
- if count is negative.- Since:
- 2.6
- See Also:
-
randomMemberWithScore
ZSetOperations.TypedTuple<V> randomMemberWithScore()Get random element with its score from set at the bound key.- Returns:
- null when used in pipeline / transaction.
- Since:
- 2.6
- See Also:
-
distinctRandomMembersWithScore
Getcount
distinct random elements with their score from set at the bound key.- Parameters:
count
- number of members to return.- Returns:
- empty
Set
ifkey
does not exist. - Throws:
IllegalArgumentException
- if count is negative.- Since:
- 2.6
- See Also:
-
randomMembersWithScore
Getcount
random elements with their score from set at the bound key.- Parameters:
count
- number of members to return.- Returns:
- empty
List
ifkey
does not exist or null when used in pipeline / transaction. - Throws:
IllegalArgumentException
- if count is negative.- Since:
- 2.6
- See Also:
-
rank
Determine the index of element withvalue
in a sorted set.- Parameters:
o
- the value.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
reverseRank
Determine the index of element withvalue
in a sorted set when scored high to low.- Parameters:
o
- the value.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
range
Get elements betweenstart
andend
from sorted set.- Parameters:
start
-end
-- Returns:
- null when used in pipeline / transaction.
- See Also:
-
rangeWithScores
- Parameters:
start
-end
-- Returns:
- null when used in pipeline / transaction.
- See Also:
-
rangeByScore
Get elements where score is betweenmin
andmax
from sorted set.- Parameters:
min
-max
-- Returns:
- null when used in pipeline / transaction.
- See Also:
-
rangeByScoreWithScores
- Parameters:
min
-max
-- Returns:
- null when used in pipeline / transaction.
- See Also:
-
reverseRange
Get elements in range fromstart
toend
from sorted set ordered from high to low.- Parameters:
start
-end
-- Returns:
- null when used in pipeline / transaction.
- See Also:
-
reverseRangeWithScores
- Parameters:
start
-end
-- Returns:
- null when used in pipeline / transaction.
- See Also:
-
reverseRangeByScore
Get elements where score is betweenmin
andmax
from sorted set ordered from high to low.- Parameters:
min
-max
-- Returns:
- null when used in pipeline / transaction.
- See Also:
-
reverseRangeByScoreWithScores
- Parameters:
min
-max
-- Returns:
- null when used in pipeline / transaction.
- See Also:
-
count
Count number of elements within sorted set with scores betweenmin
andmax
.- Parameters:
min
-max
-- Returns:
- null when used in pipeline / transaction.
- See Also:
-
lexCount
@Nullable @Deprecated(since="3.0", forRemoval=true) default Long lexCount(RedisZSetCommands.Range range) Deprecated, for removal: This API element is subject to removal in a future version.since 3.0. Please uselexCount(Range)
instead.Count number of elements within sorted set with value betweenRange#min
andRange#max
applying lexicographical ordering.- Parameters:
range
- must not be null.- Returns:
- null when used in pipeline / transaction.
- Since:
- 2.4
- See Also:
-
lexCount
Count number of elements within sorted set with value betweenRange.getLowerBound()
andRange.getUpperBound()
applying lexicographical ordering.- Parameters:
range
- must not be null.- Returns:
- null when used in pipeline / transaction.
- Since:
- 3.0
- See Also:
-
popMin
Remove and return the value with its score having the lowest score from sorted set at the bound key.- Returns:
- null when the sorted set is empty or used in pipeline / transaction.
- Since:
- 2.6
- See Also:
-
popMin
Remove and returncount
values with their score having the lowest score from sorted set at the bound key.- Parameters:
count
- number of elements to pop.- Returns:
- null when the sorted set is empty or used in pipeline / transaction.
- Since:
- 2.6
- See Also:
-
popMin
Remove and return the value with its score having the lowest score from sorted set at the bound key. Blocks connection until element available ortimeout
reached.- Parameters:
timeout
-unit
- must not be null.- Returns:
- can be null.
- Since:
- 2.6
- See Also:
-
popMin
Remove and return the value with its score having the lowest score from sorted set at the bound key. Blocks connection until element available ortimeout
reached.- Parameters:
timeout
- must not be null.- Returns:
- can be null.
- Throws:
IllegalArgumentException
- if the timeout is null or negative.- Since:
- 2.6
- See Also:
-
popMax
Remove and return the value with its score having the highest score from sorted set at the bound key.- Returns:
- null when the sorted set is empty or used in pipeline / transaction.
- Since:
- 2.6
- See Also:
-
popMax
Remove and returncount
values with their score having the highest score from sorted set at the bound key.- Parameters:
count
- number of elements to pop.- Returns:
- null when the sorted set is empty or used in pipeline / transaction.
- Since:
- 2.6
- See Also:
-
popMax
Remove and return the value with its score having the highest score from sorted set at the bound key. Blocks connection until element available ortimeout
reached.- Parameters:
timeout
-unit
- must not be null.- Returns:
- can be null.
- Since:
- 2.6
- See Also:
-
popMax
Remove and return the value with its score having the highest score from sorted set at the bound key. Blocks connection until element available ortimeout
reached.- Parameters:
timeout
- must not be null.- Returns:
- can be null.
- Throws:
IllegalArgumentException
- if the timeout is null or negative.- Since:
- 2.6
- See Also:
-
size
Returns the number of elements of the sorted set stored with given the bound key.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
zCard
Get the size of sorted set with the bound key.- Returns:
- null when used in pipeline / transaction.
- Since:
- 1.3
- See Also:
-
score
Get the score of element withvalue
from sorted set with key the bound key.- Parameters:
o
- the value.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
score
Get the scores of elements withvalues
from sorted set with key the bound key.- Parameters:
o
- the values.- Returns:
- null when used in pipeline / transaction.
- Since:
- 2.6
- See Also:
-
removeRange
Remove elements in range betweenstart
andend
from sorted set with the bound key.- Parameters:
start
-end
-- Returns:
- null when used in pipeline / transaction.
- See Also:
-
removeRangeByLex
@Nullable @Deprecated(since="3.0", forRemoval=true) default Long removeRangeByLex(RedisZSetCommands.Range range) Deprecated, for removal: This API element is subject to removal in a future version.since 3.0. Please useremoveRangeByLex(Range)
.Remove elements inRange
from sorted set with the bound key.- Parameters:
range
- must not be null.- Returns:
- null when used in pipeline / transaction.
- Since:
- 2.5
- See Also:
-
removeRangeByLex
Remove elements inRange
from sorted set with the bound key.- Parameters:
range
- must not be null.- Returns:
- null when used in pipeline / transaction.
- Since:
- 3.0
- See Also:
-
removeRangeByScore
Remove elements with scores betweenmin
andmax
from sorted set with the bound key.- Parameters:
min
-max
-- Returns:
- null when used in pipeline / transaction.
- See Also:
-
unionAndStore
@Nullable Long unionAndStore(Collection<K> otherKeys, K destKey, Aggregate aggregate, Weights weights) Union sorted sets at the bound key andotherKeys
and store result in destinationdestKey
.- Parameters:
otherKeys
- must not be null.destKey
- must not be null.aggregate
- must not be null.weights
- must not be null.- Returns:
- null when used in pipeline / transaction.
- Since:
- 2.1
- See Also:
-
difference
Diff sortedsets
.- Parameters:
otherKey
- must not be null.- Returns:
- null when used in pipeline / transaction.
- Since:
- 2.6
- See Also:
-
difference
Diff sortedsets
.- Parameters:
otherKeys
- must not be null.- Returns:
- null when used in pipeline / transaction.
- Since:
- 2.6
- See Also:
-
differenceWithScores
Diff sortedsets
.- Parameters:
otherKey
- must not be null.- Returns:
- null when used in pipeline / transaction.
- Since:
- 2.6
- See Also:
-
differenceWithScores
Diff sortedsets
.- Parameters:
otherKeys
- must not be null.- Returns:
- null when used in pipeline / transaction.
- Since:
- 2.6
- See Also:
-
differenceAndStore
Diff sortedsets
and store result in destinationdestKey
.- Parameters:
otherKey
- must not be null.destKey
- must not be null.- Returns:
- null when used in pipeline / transaction.
- Since:
- 2.6
- See Also:
-
differenceAndStore
Diff sortedsets
and store result in destinationdestKey
.- Parameters:
otherKeys
- must not be null.destKey
- must not be null.- Returns:
- null when used in pipeline / transaction.
- Since:
- 2.6
- See Also:
-
intersect
Intersect sortedsets
.- Parameters:
otherKey
- must not be null.- Returns:
- null when used in pipeline / transaction.
- Since:
- 2.6
- See Also:
-
intersect
Intersect sortedsets
.- Parameters:
otherKeys
- must not be null.- Returns:
- null when used in pipeline / transaction.
- Since:
- 2.6
- See Also:
-
intersectWithScores
Intersect sortedsets
.- Parameters:
otherKey
- must not be null.- Returns:
- null when used in pipeline / transaction.
- Since:
- 2.6
- See Also:
-
intersectWithScores
Intersect sortedsets
.- Parameters:
otherKeys
- must not be null.- Returns:
- null when used in pipeline / transaction.
- Since:
- 2.6
- See Also:
-
intersectWithScores
@Nullable Set<ZSetOperations.TypedTuple<V>> intersectWithScores(Collection<K> otherKeys, Aggregate aggregate, Weights weights) Intersect sortedsets
.- Parameters:
otherKeys
- must not be null.aggregate
- must not be null.weights
- must not be null.- Returns:
- Since:
- 2.6
- See Also:
-
intersectAndStore
Intersect sorted sets at the bound key andotherKey
and store result in destinationdestKey
.- Parameters:
otherKey
- must not be null.destKey
- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
intersectAndStore
Intersect sorted sets at the bound key andotherKeys
and store result in destinationdestKey
.- Parameters:
otherKeys
- must not be null.destKey
- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
intersectAndStore
Intersect sorted sets at the bound key andotherKeys
and store result in destinationdestKey
.- Parameters:
otherKeys
- must not be null.destKey
- must not be null.aggregate
- must not be null.- Returns:
- null when used in pipeline / transaction.
- Since:
- 2.1
- See Also:
-
intersectAndStore
@Nullable Long intersectAndStore(Collection<K> otherKeys, K destKey, Aggregate aggregate, Weights weights) Intersect sorted sets at the bound key andotherKeys
and store result in destinationdestKey
.- Parameters:
otherKeys
- must not be null.destKey
- must not be null.aggregate
- must not be null.weights
- must not be null.- Returns:
- null when used in pipeline / transaction.
- Since:
- 2.1
- See Also:
-
union
Union sortedsets
.- Parameters:
otherKey
- must not be null.- Returns:
- null when used in pipeline / transaction.
- Since:
- 2.6
- See Also:
-
union
Union sortedsets
.- Parameters:
otherKeys
- must not be null.- Returns:
- null when used in pipeline / transaction.
- Since:
- 2.6
- See Also:
-
unionWithScores
Union sortedsets
.- Parameters:
otherKey
- must not be null.- Returns:
- null when used in pipeline / transaction.
- Since:
- 2.6
- See Also:
-
unionWithScores
Union sortedsets
.- Parameters:
otherKeys
- must not be null.- Returns:
- null when used in pipeline / transaction.
- Since:
- 2.6
- See Also:
-
unionWithScores
@Nullable default Set<ZSetOperations.TypedTuple<V>> unionWithScores(Collection<K> otherKeys, Aggregate aggregate) Union sorted sets at the bound key andotherKeys
.- Parameters:
otherKeys
- must not be null.aggregate
- must not be null.- Returns:
- null when used in pipeline / transaction.
- Since:
- 2.6
- See Also:
-
unionWithScores
@Nullable Set<ZSetOperations.TypedTuple<V>> unionWithScores(Collection<K> otherKeys, Aggregate aggregate, Weights weights) Union sortedsets
.- Parameters:
otherKeys
- must not be null.aggregate
- must not be null.weights
- must not be null.- Returns:
- null when used in pipeline / transaction.
- Since:
- 2.6
- See Also:
-
unionAndStore
Union sorted sets at the bound key andotherKeys
and store result in destinationdestKey
.- Parameters:
otherKey
- must not be null.destKey
- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
unionAndStore
Union sorted sets at the bound key andotherKeys
and store result in destinationdestKey
.- Parameters:
otherKeys
- must not be null.destKey
- must not be null.- Returns:
- null when used in pipeline / transaction.
- See Also:
-
unionAndStore
Union sorted sets at the bound key andotherKeys
and store result in destinationdestKey
.- Parameters:
otherKeys
- must not be null.destKey
- must not be null.aggregate
- must not be null.- Returns:
- null when used in pipeline / transaction.
- Since:
- 2.1
- See Also:
-
scan
Use aCursor
to iterate over entries in zset at the bound key.
Important: CallCloseableIterator.close()
when done to avoid resource leaks.- Parameters:
options
- must not be null.- Returns:
- the result cursor providing access to the scan result. Must be closed once fully processed (e.g. through a try-with-resources clause).
- Since:
- 1.4
-
rangeByLex
@Nullable @Deprecated(since="3.0", forRemoval=true) default Set<V> rangeByLex(RedisZSetCommands.Range range) Deprecated, for removal: This API element is subject to removal in a future version.since 3.0. Please userangeByLex(Range)
instead.Get all elements with lexicographical ordering with a value betweenRedisZSetCommands.Range.getMin()
andRedisZSetCommands.Range.getMax()
.- Parameters:
range
- must not be null.- Returns:
- null when used in pipeline / transaction.
- Since:
- 1.7
- See Also:
-
rangeByLex
Get all elements with lexicographical ordering with a value betweenRange.getLowerBound()
andRange.getUpperBound()
.- Parameters:
range
- must not be null.- Returns:
- null when used in pipeline / transaction.
- Since:
- 3.0
- See Also:
-
rangeByLex
@Nullable @Deprecated(since="3.0", forRemoval=true) default Set<V> rangeByLex(RedisZSetCommands.Range range, Limit limit) Deprecated, for removal: This API element is subject to removal in a future version.since 3.0. Please userangeByLex(Range, Limit)
instead.Get all elements n elements, where n =Limit.getCount()
, starting atLimit.getOffset()
with lexicographical ordering from ZSET atkey
with a value betweenRedisZSetCommands.Range.getMin()
andRedisZSetCommands.Range.getMax()
.- Parameters:
range
- must not be null.limit
- can be null.- Returns:
- null when used in pipeline / transaction.
- Since:
- 1.7
- See Also:
-
rangeByLex
Get all elements n elements, where n =Limit.getCount()
, starting atLimit.getOffset()
with lexicographical ordering having a value betweenRange.getLowerBound()
andRange.getUpperBound()
.- Parameters:
range
- must not be null.limit
- can be null.- Returns:
- null when used in pipeline / transaction.
- Since:
- 3.0
- See Also:
-
reverseRangeByLex
@Nullable @Deprecated(since="3.0", forRemoval=true) default Set<V> reverseRangeByLex(RedisZSetCommands.Range range) Deprecated, for removal: This API element is subject to removal in a future version.since 3.0. Please usereverseRangeByLex(Range)
instead.Get all elements with reverse lexicographical ordering from ZSET with a value betweenRedisZSetCommands.Range.getMin()
andRedisZSetCommands.Range.getMax()
.- Parameters:
range
- must not be null.- Returns:
- null when used in pipeline / transaction.
- Since:
- 2.4
- See Also:
-
reverseRangeByLex
Get all elements with reverse lexicographical ordering with a value betweenRange.getLowerBound()
andRange.getUpperBound()
.- Parameters:
range
- must not be null.- Returns:
- null when used in pipeline / transaction.
- Since:
- 3.0
- See Also:
-
reverseRangeByLex
@Nullable @Deprecated(since="3.0", forRemoval=true) default Set<V> reverseRangeByLex(RedisZSetCommands.Range range, Limit limit) Deprecated, for removal: This API element is subject to removal in a future version.since 3.0. Please usereverseRangeByLex(Range, Limit)
instead.Get all elements n elements, where n =Limit.getCount()
, starting atLimit.getOffset()
with reverse lexicographical ordering from ZSET having a value betweenRedisZSetCommands.Range.getMin()
andRedisZSetCommands.Range.getMax()
.- Parameters:
range
- must not be null.limit
- can be null.- Returns:
- null when used in pipeline / transaction.
- Since:
- 2.4
- See Also:
-
reverseRangeByLex
Get all elements n elements, where n =Limit.getCount()
, starting atLimit.getOffset()
with reverse lexicographical ordering having a value betweenRange.getLowerBound()
andRange.getUpperBound()
.- Parameters:
range
- must not be null.limit
- can be null.- Returns:
- null when used in pipeline / transaction.
- Since:
- 3.0
- See Also:
-
rangeAndStoreByLex
Store all elements atdstKey
with lexicographical ordering from ZSET at the bound key with a value betweenRange.getLowerBound()
andRange.getUpperBound()
.- Parameters:
dstKey
- must not be null.range
- must not be null.- Returns:
- the number of stored elements or null when used in pipeline / transaction.
- Since:
- 3.0
- See Also:
-
rangeAndStoreByLex
Store n elements atdstKey
, where n =Limit.getCount()
, starting atLimit.getOffset()
with lexicographical ordering from ZSET at the bound key with a value betweenRange.getLowerBound()
andRange.getUpperBound()
.- Parameters:
dstKey
- must not be null.range
- must not be null.limit
- must not be null.- Returns:
- the number of stored elements or null when used in pipeline / transaction.
- Since:
- 3.0
- See Also:
-
reverseRangeAndStoreByLex
Store all elements atdstKey
with reverse lexicographical ordering from ZSET at the bound key with a value betweenRange.getLowerBound()
andRange.getUpperBound()
.- Parameters:
dstKey
- must not be null.range
- must not be null.- Returns:
- the number of stored elements or null when used in pipeline / transaction.
- Since:
- 3.0
- See Also:
-
reverseRangeAndStoreByLex
Store n elements atdstKey
, where n =Limit.getCount()
, starting atLimit.getOffset()
with reverse lexicographical ordering from ZSET at the bound key with a value betweenRange.getLowerBound()
andRange.getUpperBound()
.- Parameters:
dstKey
- must not be null.range
- must not be null.limit
- must not be null.- Returns:
- the number of stored elements or null when used in pipeline / transaction.
- Since:
- 3.0
- See Also:
-
rangeAndStoreByScore
Store all elements atdstKey
with ordering by score from ZSET at the bound key with a score betweenRange.getLowerBound()
andRange.getUpperBound()
.- Parameters:
dstKey
- must not be null.range
- must not be null.- Returns:
- the number of stored elements or null when used in pipeline / transaction.
- Since:
- 3.0
- See Also:
-
rangeAndStoreByScore
Store n elements atdstKey
, where n =Limit.getCount()
, starting atLimit.getOffset()
with ordering by score from ZSET at the bound key with a score betweenRange.getLowerBound()
andRange.getUpperBound()
.- Parameters:
dstKey
- must not be null.range
- must not be null.limit
- must not be null.- Returns:
- the number of stored elements or null when used in pipeline / transaction.
- Since:
- 3.0
- See Also:
-
reverseRangeAndStoreByScore
Store all elements atdstKey
with reverse ordering by score from ZSET at the bound key with a score betweenRange.getLowerBound()
andRange.getUpperBound()
.- Parameters:
dstKey
- must not be null.range
- must not be null.- Returns:
- the number of stored elements or null when used in pipeline / transaction.
- Since:
- 3.0
- See Also:
-
reverseRangeAndStoreByScore
Store n elements atdstKey
, where n =Limit.getCount()
, starting atLimit.getOffset()
with reverse ordering by score from ZSET at the bound key with a score betweenRange.getLowerBound()
andRange.getUpperBound()
.- Parameters:
dstKey
- must not be null.range
- must not be null.limit
- must not be null.- Returns:
- the number of stored elements or null when used in pipeline / transaction.
- Since:
- 3.0
- See Also:
-
getOperations
RedisOperations<K,V> getOperations()- Returns:
- never null.
-