Implementation of ZREVRANGEBYSCORE command
This commit is contained in:
@@ -2085,6 +2085,12 @@ public class Jedis extends BinaryJedis implements JedisCommands {
|
||||
client.zrangeByScore(key, min, max);
|
||||
return new LinkedHashSet<String>(client.getMultiBulkReply());
|
||||
}
|
||||
public Set<String> zrevrangeByScore(final String key, final double max,
|
||||
final double min) {
|
||||
runChecks();
|
||||
client.zrevrangeByScore(key, max, min);
|
||||
return new LinkedHashSet<String>(client.getMultiBulkReply());
|
||||
}
|
||||
|
||||
public Set<String> zrangeByScore(final String key, final String min,
|
||||
final String max) {
|
||||
@@ -2155,6 +2161,12 @@ public class Jedis extends BinaryJedis implements JedisCommands {
|
||||
client.zrangeByScore(key, min, max, offset, count);
|
||||
return new LinkedHashSet<String>(client.getMultiBulkReply());
|
||||
}
|
||||
public Set<String> zrevrangeByScore(final String key, final double max,
|
||||
final double min, final int offset, final int count) {
|
||||
runChecks();
|
||||
client.zrevrangeByScore(key, max, min, offset, count);
|
||||
return new LinkedHashSet<String>(client.getMultiBulkReply());
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the all the elements in the sorted set at key with a score between
|
||||
@@ -2219,6 +2231,13 @@ public class Jedis extends BinaryJedis implements JedisCommands {
|
||||
Set<Tuple> set = getTupledSet();
|
||||
return set;
|
||||
}
|
||||
public Set<Tuple> zrevrangeByScoreWithScores(final String key,
|
||||
final double max, final double min) {
|
||||
runChecks();
|
||||
client.zrevrangeByScoreWithScores(key, max, min);
|
||||
Set<Tuple> set = getTupledSet();
|
||||
return set;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the all the elements in the sorted set at key with a score between
|
||||
@@ -2284,6 +2303,14 @@ public class Jedis extends BinaryJedis implements JedisCommands {
|
||||
Set<Tuple> set = getTupledSet();
|
||||
return set;
|
||||
}
|
||||
public Set<Tuple> zrevrangeByScoreWithScores(final String key,
|
||||
final double max, final double min, final int offset,
|
||||
final int count) {
|
||||
runChecks();
|
||||
client.zrevrangeByScoreWithScores(key, max, min, offset, count);
|
||||
Set<Tuple> set = getTupledSet();
|
||||
return set;
|
||||
}
|
||||
|
||||
private Set<Tuple> getTupledSet() {
|
||||
runChecks();
|
||||
@@ -2607,4 +2634,4 @@ public class Jedis extends BinaryJedis implements JedisCommands {
|
||||
client.getrange(key, startOffset, endOffset);
|
||||
return client.getBulkReply();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user