Implementation of ZREVRANGEBYSCORE command
This commit is contained in:
@@ -477,6 +477,10 @@ public class BinaryClient extends Connection {
|
||||
final double max) {
|
||||
sendCommand(ZRANGEBYSCORE, key, toByteArray(min), toByteArray(max));
|
||||
}
|
||||
public void zrevrangeByScore(final byte[] key, final double max,
|
||||
final double min) {
|
||||
sendCommand(ZREVRANGEBYSCORE, key, toByteArray(max), toByteArray(min));
|
||||
}
|
||||
|
||||
public void zrangeByScore(final byte[] key, final byte[] min,
|
||||
final byte[] max) {
|
||||
@@ -488,12 +492,22 @@ public class BinaryClient extends Connection {
|
||||
sendCommand(ZRANGEBYSCORE, key, toByteArray(min), toByteArray(max),
|
||||
LIMIT.raw, toByteArray(offset), toByteArray(count));
|
||||
}
|
||||
public void zrevrangeByScore(final byte[] key, final double max,
|
||||
final double min, final int offset, int count) {
|
||||
sendCommand(ZREVRANGEBYSCORE, key, toByteArray(max), toByteArray(min),
|
||||
LIMIT.raw, toByteArray(offset), toByteArray(count));
|
||||
}
|
||||
|
||||
public void zrangeByScoreWithScores(final byte[] key, final double min,
|
||||
final double max) {
|
||||
sendCommand(ZRANGEBYSCORE, key, toByteArray(min), toByteArray(max),
|
||||
WITHSCORES.raw);
|
||||
}
|
||||
public void zrevrangeByScoreWithScores(final byte[] key, final double max,
|
||||
final double min) {
|
||||
sendCommand(ZREVRANGEBYSCORE, key, toByteArray(max), toByteArray(min),
|
||||
WITHSCORES.raw);
|
||||
}
|
||||
|
||||
public void zrangeByScoreWithScores(final byte[] key, final double min,
|
||||
final double max, final int offset, final int count) {
|
||||
@@ -501,6 +515,12 @@ public class BinaryClient extends Connection {
|
||||
LIMIT.raw, toByteArray(offset), toByteArray(count),
|
||||
WITHSCORES.raw);
|
||||
}
|
||||
public void zrevrangeByScoreWithScores(final byte[] key, final double max,
|
||||
final double min, final int offset, final int count) {
|
||||
sendCommand(ZREVRANGEBYSCORE, key, toByteArray(max), toByteArray(min),
|
||||
LIMIT.raw, toByteArray(offset), toByteArray(count),
|
||||
WITHSCORES.raw);
|
||||
}
|
||||
|
||||
public void zremrangeByRank(final byte[] key, final int start, final int end) {
|
||||
sendCommand(ZREMRANGEBYRANK, key, toByteArray(start), toByteArray(end));
|
||||
@@ -652,4 +672,4 @@ public class BinaryClient extends Connection {
|
||||
public void getrange(byte[] key, long startOffset, long endOffset) {
|
||||
sendCommand(GETRANGE, key, toByteArray(startOffset), toByteArray(endOffset));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user