public interface BoundZSetOperations<K,V> extends BoundKeyOperations<K>
| Modifier and Type | Method and Description |
|---|---|
Long |
add(Set<ZSetOperations.TypedTuple<V>> tuples)
Add
tuples to a sorted set at the bound key, or update its score if it already exists. |
Boolean |
add(V value,
double score)
Add
value to a sorted set at the bound key, or update its score if it already exists. |
Long |
count(double min,
double max)
Count number of elements within sorted set with scores between
min and max. |
RedisOperations<K,V> |
getOperations() |
Double |
incrementScore(V value,
double delta)
Increment the score of element with
value in sorted set by increment. |
Long |
intersectAndStore(Collection<K> otherKeys,
K destKey)
Intersect sorted sets at the bound key and
otherKeys and store result in destination destKey. |
Long |
intersectAndStore(Collection<K> otherKeys,
K destKey,
RedisZSetCommands.Aggregate aggregate)
Intersect sorted sets at the bound key and
otherKeys and store result in destination destKey. |
Long |
intersectAndStore(Collection<K> otherKeys,
K destKey,
RedisZSetCommands.Aggregate aggregate,
RedisZSetCommands.Weights weights)
Intersect sorted sets at the bound key and
otherKeys and store result in destination destKey. |
Long |
intersectAndStore(K otherKey,
K destKey)
Intersect sorted sets at the bound key and
otherKey and store result in destination destKey. |
Set<V> |
range(long start,
long end)
Get elements between
start and end from sorted set. |
Set<V> |
rangeByLex(RedisZSetCommands.Range range)
Get all elements with lexicographical ordering with a value between
RedisZSetCommands.Range.getMin() and
RedisZSetCommands.Range.getMax(). |
Set<V> |
rangeByLex(RedisZSetCommands.Range range,
RedisZSetCommands.Limit limit)
Get all elements n elements, where n =
RedisZSetCommands.Limit.getCount(), starting at
RedisZSetCommands.Limit.getOffset() with lexicographical ordering having a value between RedisZSetCommands.Range.getMin() and
RedisZSetCommands.Range.getMax(). |
Set<V> |
rangeByScore(double min,
double max)
Get elements where score is between
min and max from sorted set. |
Set<ZSetOperations.TypedTuple<V>> |
rangeByScoreWithScores(double min,
double max)
|
Set<ZSetOperations.TypedTuple<V>> |
rangeWithScores(long start,
long end)
|
Long |
rank(Object o)
Determine the index of element with
value in a sorted set. |
Long |
remove(Object... values)
Remove
values from sorted set. |
Long |
removeRange(long start,
long end)
Remove elements in range between
start and end from sorted set with the bound key. |
Long |
removeRangeByScore(double min,
double max)
Remove elements with scores between
min and max from sorted set with the bound key. |
Set<V> |
reverseRange(long start,
long end)
Get elements in range from
start to end from sorted set ordered from high to low. |
Set<V> |
reverseRangeByScore(double min,
double max)
Get elements where score is between
min and max from sorted set ordered from high to low. |
Set<ZSetOperations.TypedTuple<V>> |
reverseRangeByScoreWithScores(double min,
double max)
Get set of
RedisZSetCommands.Tuple where score is between min and max from sorted set ordered from high to
low. |
Set<ZSetOperations.TypedTuple<V>> |
reverseRangeWithScores(long start,
long end)
Get set of
RedisZSetCommands.Tuples in range from start to end from sorted set ordered from high to low. |
Long |
reverseRank(Object o)
Determine the index of element with
value in a sorted set when scored high to low. |
Cursor<ZSetOperations.TypedTuple<V>> |
scan(ScanOptions options)
Iterate over elements in zset at the bound key.
|
Double |
score(Object o)
Get the score of element with
value from sorted set with key the bound key. |
Long |
size()
Returns the number of elements of the sorted set stored with given the bound key.
|
Long |
unionAndStore(Collection<K> otherKeys,
K destKey)
Union sorted sets at the bound key and
otherKeys and store result in destination destKey. |
Long |
unionAndStore(Collection<K> otherKeys,
K destKey,
RedisZSetCommands.Aggregate aggregate)
Union sorted sets at the bound key and
otherKeys and store result in destination destKey. |
Long |
unionAndStore(Collection<K> otherKeys,
K destKey,
RedisZSetCommands.Aggregate aggregate,
RedisZSetCommands.Weights weights)
Union sorted sets at the bound key and
otherKeys and store result in destination destKey. |
Long |
unionAndStore(K otherKey,
K destKey)
Union sorted sets at the bound key and
otherKeys and store result in destination destKey. |
Long |
zCard()
Get the size of sorted set with the bound key.
|
@Nullable Boolean add(V value, double score)
value to a sorted set at the bound key, or update its score if it already exists.score - the score.value - the value.@Nullable Long add(Set<ZSetOperations.TypedTuple<V>> tuples)
tuples to a sorted set at the bound key, or update its score if it already exists.tuples - must not be null.@Nullable Long remove(Object... values)
values from sorted set. Return number of removed elements.values - must not be null.@Nullable Double incrementScore(V value, double delta)
value in sorted set by increment.delta - value - the value.@Nullable Long rank(Object o)
value in a sorted set.o - the value.@Nullable Long reverseRank(Object o)
value in a sorted set when scored high to low.o - the value.@Nullable Set<V> range(long start, long end)
start and end from sorted set.start - end - @Nullable Set<ZSetOperations.TypedTuple<V>> rangeWithScores(long start, long end)
start - end - @Nullable Set<V> rangeByScore(double min, double max)
min and max from sorted set.min - max - @Nullable Set<ZSetOperations.TypedTuple<V>> rangeByScoreWithScores(double min, double max)
min - max - @Nullable Set<V> reverseRange(long start, long end)
start to end from sorted set ordered from high to low.start - end - @Nullable Set<ZSetOperations.TypedTuple<V>> reverseRangeWithScores(long start, long end)
RedisZSetCommands.Tuples in range from start to end from sorted set ordered from high to low.start - end - @Nullable Set<V> reverseRangeByScore(double min, double max)
min and max from sorted set ordered from high to low.min - max - @Nullable Set<ZSetOperations.TypedTuple<V>> reverseRangeByScoreWithScores(double min, double max)
RedisZSetCommands.Tuple where score is between min and max from sorted set ordered from high to
low.min - max - @Nullable Long count(double min, double max)
min and max.min - max - @Nullable Long size()
zCard(),
Redis Documentation: ZCARD@Nullable Long zCard()
@Nullable Double score(Object o)
value from sorted set with key the bound key.o - the value.@Nullable Long removeRange(long start, long end)
start and end from sorted set with the bound key.start - end - @Nullable Long removeRangeByScore(double min, double max)
min and max from sorted set with the bound key.min - max - @Nullable Long unionAndStore(K otherKey, K destKey)
otherKeys and store result in destination destKey.otherKey - must not be null.destKey - must not be null.@Nullable Long unionAndStore(Collection<K> otherKeys, K destKey)
otherKeys and store result in destination destKey.otherKeys - must not be null.destKey - must not be null.@Nullable Long unionAndStore(Collection<K> otherKeys, K destKey, RedisZSetCommands.Aggregate aggregate)
otherKeys and store result in destination destKey.otherKeys - must not be null.destKey - must not be null.aggregate - must not be null.@Nullable Long unionAndStore(Collection<K> otherKeys, K destKey, RedisZSetCommands.Aggregate aggregate, RedisZSetCommands.Weights weights)
otherKeys and store result in destination destKey.otherKeys - must not be null.destKey - must not be null.aggregate - must not be null.weights - must not be null.@Nullable Long intersectAndStore(K otherKey, K destKey)
otherKey and store result in destination destKey.otherKey - must not be null.destKey - must not be null.@Nullable Long intersectAndStore(Collection<K> otherKeys, K destKey)
otherKeys and store result in destination destKey.otherKeys - must not be null.destKey - must not be null.@Nullable Long intersectAndStore(Collection<K> otherKeys, K destKey, RedisZSetCommands.Aggregate aggregate)
otherKeys and store result in destination destKey.otherKeys - must not be null.destKey - must not be null.aggregate - must not be null.@Nullable Long intersectAndStore(Collection<K> otherKeys, K destKey, RedisZSetCommands.Aggregate aggregate, RedisZSetCommands.Weights weights)
otherKeys and store result in destination destKey.otherKeys - must not be null.destKey - must not be null.aggregate - must not be null.weights - must not be null.Cursor<ZSetOperations.TypedTuple<V>> scan(ScanOptions options)
Closeable.close() when done to avoid resource leak.options - @Nullable Set<V> rangeByLex(RedisZSetCommands.Range range)
RedisZSetCommands.Range.getMin() and
RedisZSetCommands.Range.getMax().range - must not be null.@Nullable Set<V> rangeByLex(RedisZSetCommands.Range range, RedisZSetCommands.Limit limit)
RedisZSetCommands.Limit.getCount(), starting at
RedisZSetCommands.Limit.getOffset() with lexicographical ordering having a value between RedisZSetCommands.Range.getMin() and
RedisZSetCommands.Range.getMax().range - must not be null.limit - can be null.RedisOperations<K,V> getOperations()
Copyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.