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