public interface RedisZSetCommands
Modifier and Type | Interface and Description |
---|---|
static class |
RedisZSetCommands.Aggregate
Sort aggregation operations.
|
static class |
RedisZSetCommands.Limit |
static class |
RedisZSetCommands.Range
RedisZSetCommands.Range defines min and max values to retrieve from a ZSET. |
static interface |
RedisZSetCommands.Tuple
ZSet tuple.
|
static class |
RedisZSetCommands.Weights
Value object encapsulating a multiplication factor for each input sorted set.
|
Modifier and Type | Method and Description |
---|---|
Boolean |
zAdd(byte[] key,
double score,
byte[] value)
Add
value to a sorted set at key , or update its score if it already exists. |
Long |
zAdd(byte[] key,
Set<RedisZSetCommands.Tuple> tuples)
Add
tuples to a sorted set at key , or update its score if it already exists. |
Long |
zCard(byte[] key)
Get the size of sorted set with
key . |
default Long |
zCount(byte[] key,
double min,
double max)
Count number of elements within sorted set with scores between
min and max . |
Long |
zCount(byte[] key,
RedisZSetCommands.Range range)
Count number of elements within sorted set with scores between
Range#min and Range#max . |
Double |
zIncrBy(byte[] key,
double increment,
byte[] value)
Increment the score of element with
value in sorted set by increment . |
Long |
zInterStore(byte[] destKey,
byte[]... sets)
Intersect sorted
sets and store result in destination key . |
default Long |
zInterStore(byte[] destKey,
RedisZSetCommands.Aggregate aggregate,
int[] weights,
byte[]... sets)
Intersect sorted
sets and store result in destination key . |
Long |
zInterStore(byte[] destKey,
RedisZSetCommands.Aggregate aggregate,
RedisZSetCommands.Weights weights,
byte[]... sets)
Intersect sorted
sets and store result in destination key . |
Long |
zLexCount(byte[] key,
RedisZSetCommands.Range range)
Count number of elements within sorted set with value between
Range#min and Range#max applying
lexicographical ordering. |
Set<byte[]> |
zRange(byte[] key,
long start,
long end)
Get elements between
start and end from sorted set. |
default Set<byte[]> |
zRangeByLex(byte[] key)
Get all the elements in the sorted set at key in lexicographical ordering.
|
default Set<byte[]> |
zRangeByLex(byte[] key,
RedisZSetCommands.Range range)
Get all the elements in
RedisZSetCommands.Range from the sorted set at key in lexicographical ordering. |
Set<byte[]> |
zRangeByLex(byte[] key,
RedisZSetCommands.Range range,
RedisZSetCommands.Limit limit)
Get all the elements in
RedisZSetCommands.Range from the sorted set at key in lexicographical ordering. |
default Set<byte[]> |
zRangeByScore(byte[] key,
double min,
double max)
Get elements where score is between
min and max from sorted set. |
default Set<byte[]> |
zRangeByScore(byte[] 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. |
default Set<byte[]> |
zRangeByScore(byte[] key,
RedisZSetCommands.Range range)
Get elements where score is between
Range#min and Range#max from sorted set. |
Set<byte[]> |
zRangeByScore(byte[] key,
RedisZSetCommands.Range range,
RedisZSetCommands.Limit limit)
Get elements in range from
Limit#count to Limit#offset where score is between Range#min and
Range#max from sorted set. |
default Set<byte[]> |
zRangeByScore(byte[] key,
String min,
String max)
Get elements where score is between
min and max from sorted set. |
Set<byte[]> |
zRangeByScore(byte[] key,
String min,
String max,
long offset,
long count)
Get elements in range from
start to end where score is between min and max from
sorted set. |
default Set<RedisZSetCommands.Tuple> |
zRangeByScoreWithScores(byte[] key,
double min,
double max)
|
default Set<RedisZSetCommands.Tuple> |
zRangeByScoreWithScores(byte[] key,
double min,
double max,
long offset,
long count)
Get set of
RedisZSetCommands.Tuple s in range from start to end where score is between min and
max from sorted set. |
default Set<RedisZSetCommands.Tuple> |
zRangeByScoreWithScores(byte[] key,
RedisZSetCommands.Range range)
|
Set<RedisZSetCommands.Tuple> |
zRangeByScoreWithScores(byte[] key,
RedisZSetCommands.Range range,
RedisZSetCommands.Limit limit)
Get set of
RedisZSetCommands.Tuple s in range from Limit#offset to Limit#offset + Limit#count where score is
between Range#min and Range#max from sorted set. |
Set<RedisZSetCommands.Tuple> |
zRangeWithScores(byte[] key,
long start,
long end)
|
Long |
zRank(byte[] key,
byte[] value)
Determine the index of element with
value in a sorted set. |
Long |
zRem(byte[] key,
byte[]... values)
Remove
values from sorted set. |
Long |
zRemRange(byte[] key,
long start,
long end)
Remove elements in range between
start and end from sorted set with key . |
default Long |
zRemRangeByScore(byte[] key,
double min,
double max)
Remove elements with scores between
min and max from sorted set with key . |
Long |
zRemRangeByScore(byte[] key,
RedisZSetCommands.Range range)
Remove elements with scores between
Range#min and Range#max from sorted set with key . |
Set<byte[]> |
zRevRange(byte[] key,
long start,
long end)
Get elements in range from
start to end from sorted set ordered from high to low. |
default Set<byte[]> |
zRevRangeByLex(byte[] key)
Get all the elements in the sorted set at key in reversed lexicographical ordering.
|
default Set<byte[]> |
zRevRangeByLex(byte[] key,
RedisZSetCommands.Range range)
Get all the elements in
RedisZSetCommands.Range from the sorted set at key in reversed lexicographical ordering. |
Set<byte[]> |
zRevRangeByLex(byte[] key,
RedisZSetCommands.Range range,
RedisZSetCommands.Limit limit)
Get all the elements in
RedisZSetCommands.Range from the sorted set at key in reversed lexicographical ordering. |
default Set<byte[]> |
zRevRangeByScore(byte[] key,
double min,
double max)
Get elements where score is between
min and max from sorted set ordered from high to low. |
default Set<byte[]> |
zRevRangeByScore(byte[] 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. |
default Set<byte[]> |
zRevRangeByScore(byte[] key,
RedisZSetCommands.Range range)
Get elements where score is between
Range#min and Range#max from sorted set ordered from high to
low. |
Set<byte[]> |
zRevRangeByScore(byte[] key,
RedisZSetCommands.Range range,
RedisZSetCommands.Limit limit)
Get elements in range from
Limit#offset to Limit#offset + Limit#count where score is between
Range#min and Range#max from sorted set ordered high -> low. |
default Set<RedisZSetCommands.Tuple> |
zRevRangeByScoreWithScores(byte[] 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. |
default Set<RedisZSetCommands.Tuple> |
zRevRangeByScoreWithScores(byte[] 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. |
default Set<RedisZSetCommands.Tuple> |
zRevRangeByScoreWithScores(byte[] key,
RedisZSetCommands.Range range)
Get set of
RedisZSetCommands.Tuple where score is between Range#min and Range#max from sorted set ordered
from high to low. |
Set<RedisZSetCommands.Tuple> |
zRevRangeByScoreWithScores(byte[] key,
RedisZSetCommands.Range range,
RedisZSetCommands.Limit limit)
Get set of
RedisZSetCommands.Tuple in range from Limit#offset to Limit#count where score is between
Range#min and Range#max from sorted set ordered high -> low. |
Set<RedisZSetCommands.Tuple> |
zRevRangeWithScores(byte[] key,
long start,
long end)
Get set of
RedisZSetCommands.Tuple s in range from start to end from sorted set ordered from high to low. |
Long |
zRevRank(byte[] key,
byte[] value)
Determine the index of element with
value in a sorted set when scored high to low. |
Cursor<RedisZSetCommands.Tuple> |
zScan(byte[] key,
ScanOptions options)
Use a
Cursor to iterate over elements in sorted set at key . |
Double |
zScore(byte[] key,
byte[] value)
Get the score of element with
value from sorted set with key key . |
Long |
zUnionStore(byte[] destKey,
byte[]... sets)
Union sorted
sets and store result in destination key . |
default Long |
zUnionStore(byte[] destKey,
RedisZSetCommands.Aggregate aggregate,
int[] weights,
byte[]... sets)
Union sorted
sets and store result in destination key . |
Long |
zUnionStore(byte[] destKey,
RedisZSetCommands.Aggregate aggregate,
RedisZSetCommands.Weights weights,
byte[]... sets)
Union sorted
sets and store result in destination key . |
@Nullable Boolean zAdd(byte[] key, double score, byte[] value)
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 zAdd(byte[] key, Set<RedisZSetCommands.Tuple> 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 zRem(byte[] key, byte[]... values)
values
from sorted set. Return number of removed elements.key
- must not be null.values
- must not be null.@Nullable Double zIncrBy(byte[] key, double increment, byte[] value)
value
in sorted set by increment
.key
- must not be null.increment
- value
- the value.@Nullable Long zRank(byte[] key, byte[] value)
value
in a sorted set.key
- must not be null.value
- the value. Must not be null.@Nullable Long zRevRank(byte[] key, byte[] value)
value
in a sorted set when scored high to low.key
- must not be null.value
- the value.@Nullable Set<byte[]> zRange(byte[] key, long start, long end)
start
and end
from sorted set.key
- must not be null.start
- end
- Set
when key does not exists or no members in range. null when used in pipeline /
transaction.@Nullable Set<RedisZSetCommands.Tuple> zRangeWithScores(byte[] key, long start, long end)
key
- must not be null.start
- end
- Set
when key does not exists or no members in range. null when used in pipeline /
transaction.@Nullable default Set<byte[]> zRangeByScore(byte[] key, double min, double max)
min
and max
from sorted set.key
- must not be null.min
- max
- Set
when key does not exists or no members in range. null when used in pipeline /
transaction.@Nullable default Set<RedisZSetCommands.Tuple> zRangeByScoreWithScores(byte[] key, RedisZSetCommands.Range range)
key
- must not be null.range
- must not be null.Set
when key does not exists or no members in range. null when used in pipeline /
transaction.@Nullable default Set<RedisZSetCommands.Tuple> zRangeByScoreWithScores(byte[] key, double min, double max)
key
- must not be null.min
- max
- Set
when key does not exists or no members in range. null when used in pipeline /
transaction.@Nullable default Set<byte[]> zRangeByScore(byte[] 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
- Set
when key does not exists or no members in range. null when used in pipeline /
transaction.@Nullable default Set<RedisZSetCommands.Tuple> zRangeByScoreWithScores(byte[] key, double min, double max, long offset, long count)
RedisZSetCommands.Tuple
s in range from start
to end
where score is between min
and
max
from sorted set.key
- must not be null.min
- max
- offset
- count
- Set
when key does not exists or no members in range. null when used in pipeline /
transaction.@Nullable Set<RedisZSetCommands.Tuple> zRangeByScoreWithScores(byte[] key, RedisZSetCommands.Range range, RedisZSetCommands.Limit limit)
RedisZSetCommands.Tuple
s in range from Limit#offset
to Limit#offset + Limit#count
where score is
between Range#min
and Range#max
from sorted set.key
- must not be null.range
- must not be null.limit
- must not be null.Set
when key does not exists or no members in range. null when used in pipeline /
transaction.@Nullable Set<byte[]> zRevRange(byte[] key, long start, long end)
start
to end
from sorted set ordered from high to low.key
- must not be null.start
- end
- Set
when key does not exists or no members in range. null when used in pipeline /
transaction.@Nullable Set<RedisZSetCommands.Tuple> zRevRangeWithScores(byte[] key, long start, long end)
RedisZSetCommands.Tuple
s in range from start
to end
from sorted set ordered from high to low.key
- must not be null.start
- end
- Set
when key does not exists or no members in range. null when used in pipeline /
transaction.@Nullable default Set<byte[]> zRevRangeByScore(byte[] key, double min, double max)
min
and max
from sorted set ordered from high to low.key
- must not be null.min
- max
- Set
when key does not exists or no members in range. null when used in pipeline /
transaction.@Nullable default Set<byte[]> zRevRangeByScore(byte[] key, RedisZSetCommands.Range range)
Range#min
and Range#max
from sorted set ordered from high to
low.key
- must not be null.range
- must not be null.Set
when key does not exists or no members in range. null when used in pipeline /
transaction.@Nullable default Set<RedisZSetCommands.Tuple> zRevRangeByScoreWithScores(byte[] 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
- Set
when key does not exists or no members in range. null when used in pipeline /
transaction.@Nullable default Set<byte[]> zRevRangeByScore(byte[] 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<byte[]> zRevRangeByScore(byte[] key, RedisZSetCommands.Range range, RedisZSetCommands.Limit limit)
Limit#offset
to Limit#offset + Limit#count
where score is between
Range#min
and Range#max
from sorted set ordered high -> low.key
- must not be null.range
- must not be null.limit
- must not be null.@Nullable default Set<RedisZSetCommands.Tuple> zRevRangeByScoreWithScores(byte[] 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 default Set<RedisZSetCommands.Tuple> zRevRangeByScoreWithScores(byte[] key, RedisZSetCommands.Range range)
RedisZSetCommands.Tuple
where score is between Range#min
and Range#max
from sorted set ordered
from high to low.key
- must not be null.range
- must not be null.@Nullable Set<RedisZSetCommands.Tuple> zRevRangeByScoreWithScores(byte[] key, RedisZSetCommands.Range range, RedisZSetCommands.Limit limit)
RedisZSetCommands.Tuple
in range from Limit#offset
to Limit#count
where score is between
Range#min
and Range#max
from sorted set ordered high -> low.key
- must not be null.range
- must not be null.limit
- must not be null.@Nullable default Long zCount(byte[] key, double min, double max)
min
and max
.key
- must not be null.min
- max
- @Nullable Long zCount(byte[] key, RedisZSetCommands.Range range)
Range#min
and Range#max
.key
- must not be null.range
- must not be null.@Nullable Long zLexCount(byte[] key, RedisZSetCommands.Range range)
Range#min
and Range#max
applying
lexicographical ordering.key
- must not be null.range
- must not be null.@Nullable Long zCard(byte[] key)
key
.key
- must not be null.@Nullable Double zScore(byte[] key, byte[] value)
value
from sorted set with key key
.key
- must not be null.value
- the value.@Nullable Long zRemRange(byte[] key, long start, long end)
start
and end
from sorted set with key
.key
- must not be null.start
- end
- @Nullable default Long zRemRangeByScore(byte[] key, double min, double max)
min
and max
from sorted set with key
.key
- must not be null.min
- max
- @Nullable Long zRemRangeByScore(byte[] key, RedisZSetCommands.Range range)
Range#min
and Range#max
from sorted set with key
.key
- must not be null.range
- must not be null.@Nullable Long zUnionStore(byte[] destKey, byte[]... sets)
sets
and store result in destination key
.destKey
- must not be null.sets
- must not be null.@Nullable default Long zUnionStore(byte[] destKey, RedisZSetCommands.Aggregate aggregate, int[] weights, byte[]... sets)
sets
and store result in destination key
.destKey
- must not be null.aggregate
- must not be null.weights
- must not be null.sets
- must not be null.@Nullable Long zUnionStore(byte[] destKey, RedisZSetCommands.Aggregate aggregate, RedisZSetCommands.Weights weights, byte[]... sets)
sets
and store result in destination key
.destKey
- must not be null.aggregate
- must not be null.weights
- must not be null.sets
- must not be null.@Nullable Long zInterStore(byte[] destKey, byte[]... sets)
sets
and store result in destination key
.destKey
- must not be null.sets
- must not be null.@Nullable default Long zInterStore(byte[] destKey, RedisZSetCommands.Aggregate aggregate, int[] weights, byte[]... sets)
sets
and store result in destination key
.destKey
- must not be null.aggregate
- must not be null.weights
- sets
- must not be null.@Nullable Long zInterStore(byte[] destKey, RedisZSetCommands.Aggregate aggregate, RedisZSetCommands.Weights weights, byte[]... sets)
sets
and store result in destination key
.destKey
- must not be null.aggregate
- must not be null.weights
- must not be null.sets
- must not be null.Cursor<RedisZSetCommands.Tuple> zScan(byte[] key, ScanOptions options)
Cursor
to iterate over elements in sorted set at key
.key
- must not be null.options
- must not be null.@Nullable default Set<byte[]> zRangeByScore(byte[] key, String min, String max)
min
and max
from sorted set.key
- must not be null.min
- max
- @Nullable default Set<byte[]> zRangeByScore(byte[] key, RedisZSetCommands.Range range)
Range#min
and Range#max
from sorted set.key
- must not be null.range
- must not be null.@Nullable Set<byte[]> zRangeByScore(byte[] key, String min, String max, long offset, long count)
start
to end
where score is between min
and max
from
sorted set.key
- must not be null.min
- must not be null.max
- must not be null.offset
- count
- @Nullable Set<byte[]> zRangeByScore(byte[] key, RedisZSetCommands.Range range, RedisZSetCommands.Limit limit)
Limit#count
to Limit#offset
where score is between Range#min
and
Range#max
from sorted set.key
- must not be null.range
- must not be null.limit
- must not be null.@Nullable default Set<byte[]> zRangeByLex(byte[] key)
key
- must not be null.@Nullable default Set<byte[]> zRangeByLex(byte[] key, RedisZSetCommands.Range range)
RedisZSetCommands.Range
from the sorted set at key in lexicographical ordering.key
- must not be null.range
- must not be null.@Nullable Set<byte[]> zRangeByLex(byte[] key, RedisZSetCommands.Range range, RedisZSetCommands.Limit limit)
RedisZSetCommands.Range
from the sorted set at key in lexicographical ordering. Result is
limited via RedisZSetCommands.Limit
.key
- must not be null.range
- must not be null.limit
- must not be null.@Nullable default Set<byte[]> zRevRangeByLex(byte[] key)
key
- must not be null.@Nullable default Set<byte[]> zRevRangeByLex(byte[] key, RedisZSetCommands.Range range)
RedisZSetCommands.Range
from the sorted set at key in reversed lexicographical ordering.key
- must not be null.range
- must not be null.@Nullable Set<byte[]> zRevRangeByLex(byte[] key, RedisZSetCommands.Range range, RedisZSetCommands.Limit limit)
RedisZSetCommands.Range
from the sorted set at key in reversed lexicographical ordering.
Result is limited via RedisZSetCommands.Limit
.key
- must not be null.range
- must not be null.limit
- must not be null.Copyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.