Support Sorted Set with LEX commands
* new commands : ZLEXCOUNT, ZRANGEBYLEX, ZREMRANGEBYLEX ** added commands to Jedis, ShardedJedis, JedisCluster, PipelineBase with Binary / Normal(String) ** description links *** http://redis.io/commands/zlexcount *** http://redis.io/commands/zrangebylex *** http://redis.io/commands/zremrangebylex ** Unit test included
This commit is contained in:
@@ -1008,6 +1008,56 @@ abstract class PipelineBase extends Queable implements BinaryRedisPipeline,
|
||||
return getResponse(BuilderFactory.DOUBLE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Response<Long> zlexcount(final byte[] key, final byte[] min, final byte[] max) {
|
||||
getClient(key).zlexcount(key, min, max);
|
||||
return getResponse(BuilderFactory.LONG);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Response<Long> zlexcount(final String key, final String min, final String max) {
|
||||
getClient(key).zlexcount(key, min, max);
|
||||
return getResponse(BuilderFactory.LONG);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Response<Set<byte[]>> zrangeByLex(final byte[] key, final byte[] max, final byte[] min) {
|
||||
getClient(key).zrangeByLex(key, min, max);
|
||||
return getResponse(BuilderFactory.BYTE_ARRAY_ZSET);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Response<Set<String>> zrangeByLex(final String key, final String max, final String min) {
|
||||
getClient(key).zrangeByLex(key, min, max);
|
||||
return getResponse(BuilderFactory.STRING_ZSET);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Response<Set<byte[]>> zrangeByLex(final byte[] key, final byte[] max,
|
||||
final byte[] min, final int offset, final int count) {
|
||||
getClient(key).zrangeByLex(key, min, max, offset, count);
|
||||
return getResponse(BuilderFactory.BYTE_ARRAY_ZSET);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Response<Set<String>> zrangeByLex(final String key, final String max,
|
||||
final String min, final int offset, final int count) {
|
||||
getClient(key).zrangeByLex(key, min, max, offset, count);
|
||||
return getResponse(BuilderFactory.STRING_ZSET);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Response<Long> zremrangeByLex(final byte[] key, final byte[] min, final byte[] max) {
|
||||
getClient(key).zremrangeByLex(key, min, max);
|
||||
return getResponse(BuilderFactory.LONG);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Response<Long> zremrangeByLex(final String key, final String min, final String max) {
|
||||
getClient(key).zremrangeByLex(key, min, max);
|
||||
return getResponse(BuilderFactory.LONG);
|
||||
}
|
||||
|
||||
public Response<Long> bitcount(String key) {
|
||||
getClient(key).bitcount(key);
|
||||
return getResponse(BuilderFactory.LONG);
|
||||
|
||||
Reference in New Issue
Block a user