public interface IZSetCommands<K,V>
| Modifier and Type | Method and Description |
|---|---|
Long |
zAdd(K key,
Map<V,Double> scoreMembers)
Add
scoreMembers to a sorted set at key, or update its score if it already exists. |
Boolean |
zAdd(K key,
V member,
double score)
Add
member to a sorted set at key, or update its score if it already exists. |
Long |
zCard(K key)
Returns the number of elements of the sorted set stored with given
key. |
Long |
zCount(K key,
double min,
double max)
Count number of elements within sorted set with scores between
min and max. |
Double |
zIncrby(K key,
V member,
double score)
Increment the score of element with
member in sorted set by score. |
Long |
zInterStore(K key,
Collection<K> otherKeys,
K destKey)
Intersect sorted sets at
key and otherKeys and store result in destination destKey. |
default Long |
zInterStore(K key,
Collection<K> otherKeys,
K destKey,
org.springframework.data.redis.connection.RedisZSetCommands.Aggregate aggregate)
Intersect sorted sets at
key and otherKeys and store result in destination destKey. |
Long |
zInterStore(K key,
Collection<K> otherKeys,
K destKey,
org.springframework.data.redis.connection.RedisZSetCommands.Aggregate aggregate,
org.springframework.data.redis.connection.RedisZSetCommands.Weights weights)
Intersect sorted sets at
key and otherKeys and store result in destination destKey. |
Long |
zInterStore(K key,
K otherKey,
K destKey)
Intersect sorted sets at
key and otherKey and store result in destination destKey. |
Set<V> |
zRange(K key,
long start,
long end)
Get elements between
start and end from sorted set. |
Set<V> |
zRangeByLex(K key,
org.springframework.data.redis.connection.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> |
zRangeByLex(K key,
org.springframework.data.redis.connection.RedisZSetCommands.Range range,
org.springframework.data.redis.connection.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> |
zRangeByScore(K key,
double min,
double max)
Get elements where score is between
min and max from sorted set. |
Set<V> |
zRangeByScore(K key,
double min,
double max,
long offset,
long count)
Get elements in range from
min to max where score is between min and max from
sorted set. |
Long |
zRank(K key,
Object member)
Determine the index of element with
value in a sorted set. |
Long |
zRem(K key,
Object... members)
Remove
values from sorted set. |
Long |
zRemRangeByRank(K key,
long start,
long end)
Remove elements in range between
start and end from sorted set with key. |
Long |
zRemRangeByScore(K key,
double min,
double max)
Remove elements with scores between
min and max from sorted set with key. |
Set<V> |
zRevRange(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> |
zRevRange(K key,
long start,
long end)
Get elements in range from
start to end from sorted set ordered from high to low. |
Set<V> |
zRevRangeByScore(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. |
Long |
zRevRank(K key,
Object member)
Determine the index of element with
member in a sorted set when scored high to low. |
org.springframework.data.redis.core.Cursor<org.springframework.data.redis.core.ZSetOperations.TypedTuple<V>> |
zScan(K key,
org.springframework.data.redis.core.ScanOptions options)
Iterate over elements in zset at
key. |
Double |
zScore(K key,
Object member)
Get the score of element with
member from sorted set with key key. |
Long |
zUnionStore(K key,
Collection<K> otherKeys,
K destKey)
Union sorted sets at
key and otherKeys and store result in destination destKey. |
default Long |
zUnionStore(K key,
Collection<K> otherKeys,
K destKey,
org.springframework.data.redis.connection.RedisZSetCommands.Aggregate aggregate)
Union sorted sets at
key and otherKeys and store result in destination destKey. |
Long |
zUnionStore(K key,
Collection<K> otherKeys,
K destKey,
org.springframework.data.redis.connection.RedisZSetCommands.Aggregate aggregate,
org.springframework.data.redis.connection.RedisZSetCommands.Weights weights)
Union sorted sets at
key and otherKeys and store result in destination destKey. |
Long |
zUnionStore(K key,
K otherKey,
K destKey)
Union sorted sets at
key and otherKeys and store result in destination destKey. |
@Nullable Boolean zAdd(K key, V member, double score)
member to a sorted set at key, or update its score if it already exists.key - must not be null.member - the member.score - the score.@Nullable Long zAdd(K key, Map<V,Double> scoreMembers)
scoreMembers to a sorted set at key, or update its score if it already exists.key - must not be null.scoreMembers - must not be null.@Nullable Long zCard(K key)
key.key - @Nullable Long zCount(K key, double min, double max)
min and max.key - must not be null.min - max - @Nullable Double zIncrby(K key, V member, double score)
member in sorted set by score.key - must not be null.member - the member.score - @Nullable Set<V> zRange(K key, long start, long end)
start and end from sorted set.key - must not be null.start - end - @Nullable Set<V> zRevRange(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<V> zRangeByScore(K key, double min, double max)
min and max from sorted set.key - must not be null.min - max - @Nullable Long zRank(K key, Object member)
value in a sorted set.key - must not be null.member - the member.@Nullable Long zRevRank(K key, Object member)
member in a sorted set when scored high to low.key - must not be null.member - the member.@Nullable Long zRem(K key, Object... members)
values from sorted set. Return number of removed elements.key - must not be null.members - must not be null.@Nullable Double zScore(K key, Object member)
member from sorted set with key key.key - must not be null.member - the member.@Nullable Set<V> zRangeByScore(K key, double min, double max, long offset, long count)
min to max where score is between min and max from
sorted set.key - must not be null.min - max - offset - count - @Nullable Set<V> zRevRange(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<V> zRevRangeByScore(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 Long zRemRangeByRank(K key, long start, long end)
start and end from sorted set with key.key - must not be null.start - end - @Nullable Long zRemRangeByScore(K key, double min, double max)
min and max from sorted set with key.key - must not be null.min - max - @Nullable Long zUnionStore(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 zUnionStore(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.default Long zUnionStore(K key, Collection<K> otherKeys, K destKey, org.springframework.data.redis.connection.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 zUnionStore(K key, Collection<K> otherKeys, K destKey, org.springframework.data.redis.connection.RedisZSetCommands.Aggregate aggregate, org.springframework.data.redis.connection.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 zInterStore(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 zInterStore(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.default Long zInterStore(K key, Collection<K> otherKeys, K destKey, org.springframework.data.redis.connection.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 zInterStore(K key, Collection<K> otherKeys, K destKey, org.springframework.data.redis.connection.RedisZSetCommands.Aggregate aggregate, org.springframework.data.redis.connection.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.org.springframework.data.redis.core.Cursor<org.springframework.data.redis.core.ZSetOperations.TypedTuple<V>> zScan(K key, org.springframework.data.redis.core.ScanOptions options)
key. Closeable.close() when done to avoid resource leak.key - options - @Nullable Set<V> zRangeByLex(K key, org.springframework.data.redis.connection.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> zRangeByLex(K key, org.springframework.data.redis.connection.RedisZSetCommands.Range range, org.springframework.data.redis.connection.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.Copyright © 2021. All rights reserved.