public interface RedisZSetCommands
Modifier and Type | Interface and Description |
---|---|
static class |
RedisZSetCommands.Aggregate
Sort aggregation operations.
|
static interface |
RedisZSetCommands.Tuple
ZSet tuple.
|
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 . |
Long |
zCount(byte[] key,
double min,
double max)
Count number of elements within sorted set with scores between
min and 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 . |
Long |
zInterStore(byte[] destKey,
RedisZSetCommands.Aggregate aggregate,
int[] weights,
byte[]... sets)
Intersect sorted
sets and store result in destination key . |
Set<byte[]> |
zRange(byte[] key,
long begin,
long end)
Get elements between
begin and end from sorted set. |
Set<byte[]> |
zRangeByScore(byte[] key,
double min,
double max)
Get elements where score is between
min and max from sorted set. |
Set<byte[]> |
zRangeByScore(byte[] key,
double min,
double max,
long offset,
long count)
Get elements in range from
begin to end where score is between min and max from
sorted set. |
Set<RedisZSetCommands.Tuple> |
zRangeByScoreWithScores(byte[] key,
double min,
double max)
|
Set<RedisZSetCommands.Tuple> |
zRangeByScoreWithScores(byte[] key,
double min,
double max,
long offset,
long count)
Get set of
RedisZSetCommands.Tuple s in range from begin to end where score is between min and
max from sorted set. |
Set<RedisZSetCommands.Tuple> |
zRangeWithScores(byte[] key,
long begin,
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 begin,
long end)
Remove elements in range between
begin and end from sorted set with key . |
Long |
zRemRangeByScore(byte[] key,
double min,
double max)
Remove elements with scores between
min and max from sorted set with key . |
Set<byte[]> |
zRevRange(byte[] key,
long begin,
long end)
Get elements in range from
begin to end from sorted set ordered high -> low. |
Set<byte[]> |
zRevRangeByScore(byte[] key,
double min,
double max)
Get elements where score is between
min and max from sorted set ordered high -> low. |
Set<byte[]> |
zRevRangeByScore(byte[] key,
double min,
double max,
long offset,
long count)
Get elements in range from
begin to end where score is between min and max from
sorted set ordered high -> low. |
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 high -> low. |
Set<RedisZSetCommands.Tuple> |
zRevRangeByScoreWithScores(byte[] key,
double min,
double max,
long offset,
long count)
Get set of
RedisZSetCommands.Tuple in range from begin to end where score is between min and
max from sorted set ordered high -> low. |
Set<RedisZSetCommands.Tuple> |
zRevRangeWithScores(byte[] key,
long begin,
long end)
|
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 . |
Long |
zUnionStore(byte[] destKey,
RedisZSetCommands.Aggregate aggregate,
int[] weights,
byte[]... sets)
Union sorted
sets and store result in destination key . |
Boolean zAdd(byte[] key, double score, byte[] value)
value
to a sorted set at key
, or update its score
if it already exists.key
- score
- value
- http://redis.io/commands/zadd
Long zAdd(byte[] key, Set<RedisZSetCommands.Tuple> tuples)
tuples
to a sorted set at key
, or update its score
if it already exists.key
- tuples
- http://redis.io/commands/zadd
Long zRem(byte[] key, byte[]... values)
values
from sorted set. Return number of removed elements.key
- values
- http://redis.io/commands/zrem
Double zIncrBy(byte[] key, double increment, byte[] value)
value
in sorted set by increment
.key
- increment
- value
- http://redis.io/commands/zincrby
Long zRank(byte[] key, byte[] value)
value
in a sorted set.key
- value
- http://redis.io/commands/zrank
Long zRevRank(byte[] key, byte[] value)
value
in a sorted set when scored high to low.key
- value
- http://redis.io/commands/zrevrank
Set<byte[]> zRange(byte[] key, long begin, long end)
begin
and end
from sorted set.key
- begin
- end
- http://redis.io/commands/zrange
Set<RedisZSetCommands.Tuple> zRangeWithScores(byte[] key, long begin, long end)
key
- begin
- end
- http://redis.io/commands/zrange
Set<byte[]> zRangeByScore(byte[] key, double min, double max)
min
and max
from sorted set.key
- begin
- end
- http://redis.io/commands/zrangebyscore
Set<RedisZSetCommands.Tuple> zRangeByScoreWithScores(byte[] key, double min, double max)
key
- begin
- end
- http://redis.io/commands/zrangebyscore
Set<byte[]> zRangeByScore(byte[] key, double min, double max, long offset, long count)
begin
to end
where score is between min
and max
from
sorted set.key
- begin
- end
- http://redis.io/commands/zrangebyscore
Set<RedisZSetCommands.Tuple> zRangeByScoreWithScores(byte[] key, double min, double max, long offset, long count)
RedisZSetCommands.Tuple
s in range from begin
to end
where score is between min
and
max
from sorted set.key
- begin
- end
- http://redis.io/commands/zrangebyscore
Set<byte[]> zRevRange(byte[] key, long begin, long end)
begin
to end
from sorted set ordered high -> low.key
- begin
- end
- http://redis.io/commands/zrevrange
Set<RedisZSetCommands.Tuple> zRevRangeWithScores(byte[] key, long begin, long end)
key
- begin
- end
- http://redis.io/commands/zrevrange
Set<byte[]> zRevRangeByScore(byte[] key, double min, double max)
min
and max
from sorted set ordered high -> low.key
- begin
- end
- http://redis.io/commands/zrevrange
Set<RedisZSetCommands.Tuple> zRevRangeByScoreWithScores(byte[] key, double min, double max)
RedisZSetCommands.Tuple
where score is between min
and max
from sorted set ordered high -> low.key
- begin
- end
- http://redis.io/commands/zrevrange
Set<byte[]> zRevRangeByScore(byte[] key, double min, double max, long offset, long count)
begin
to end
where score is between min
and max
from
sorted set ordered high -> low.key
- begin
- end
- http://redis.io/commands/zrevrangebyscore
Set<RedisZSetCommands.Tuple> zRevRangeByScoreWithScores(byte[] key, double min, double max, long offset, long count)
RedisZSetCommands.Tuple
in range from begin
to end
where score is between min
and
max
from sorted set ordered high -> low.key
- begin
- end
- http://redis.io/commands/zrevrangebyscore
Long zCount(byte[] key, double min, double max)
min
and max
.key
- min
- max
- http://redis.io/commands/zcount
Long zCard(byte[] key)
key
.key
- http://redis.io/commands/zcard
Double zScore(byte[] key, byte[] value)
value
from sorted set with key key
.key
- value
- http://redis.io/commands/zrem
Long zRemRange(byte[] key, long begin, long end)
begin
and end
from sorted set with key
.key
- begin
- end
- http://redis.io/commands/zremrange
Long zRemRangeByScore(byte[] key, double min, double max)
min
and max
from sorted set with key
.key
- min
- max
- http://redis.io/commands/zremrangebyscore
Long zUnionStore(byte[] destKey, byte[]... sets)
sets
and store result in destination key
.destKey
- sets
- http://redis.io/commands/zunionstore
Long zUnionStore(byte[] destKey, RedisZSetCommands.Aggregate aggregate, int[] weights, byte[]... sets)
sets
and store result in destination key
.destKey
- aggregate
- weights
- sets
- http://redis.io/commands/zunionstore
Long zInterStore(byte[] destKey, byte[]... sets)
sets
and store result in destination key
.destKey
- sets
- http://redis.io/commands/zinterstore
Long zInterStore(byte[] destKey, RedisZSetCommands.Aggregate aggregate, int[] weights, byte[]... sets)
sets
and store result in destination key
.destKey
- sets
- http://redis.io/commands/zinterstore
Cursor<RedisZSetCommands.Tuple> zScan(byte[] key, ScanOptions options)
Cursor
to iterate over elements in sorted set at key
.key
- options
- http://redis.io/commands/scan