Completing interface
This commit is contained in:
@@ -115,6 +115,8 @@ public interface BinaryJedisCommands {
|
||||
|
||||
byte[] srandmember(byte[] key);
|
||||
|
||||
List<byte[]> srandmember(final byte[] key, final int count);
|
||||
|
||||
Long strlen(byte[] key);
|
||||
|
||||
Long zadd(byte[] key, double score, byte[] member);
|
||||
|
||||
@@ -300,6 +300,12 @@ public class BinaryShardedJedis extends Sharded<Jedis, JedisShardInfo>
|
||||
return j.srandmember(key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List srandmember(byte[] key, int count) {
|
||||
Jedis j = getShard(key);
|
||||
return j.srandmember(key, count);
|
||||
}
|
||||
|
||||
public Long zadd(byte[] key, double score, byte[] member) {
|
||||
Jedis j = getShard(key);
|
||||
return j.zadd(key, score, member);
|
||||
|
||||
@@ -623,6 +623,17 @@ public class JedisCluster implements JedisCommands, BasicCommands {
|
||||
}.run(key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> srandmember(final String key, final int count) {
|
||||
return new JedisClusterCommand<List<String>>(connectionHandler, timeout,
|
||||
maxRedirections) {
|
||||
@Override
|
||||
public List<String> execute(Jedis connection) {
|
||||
return connection.srandmember(key, count);
|
||||
}
|
||||
}.run(key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long strlen(final String key) {
|
||||
return new JedisClusterCommand<Long>(connectionHandler, timeout,
|
||||
|
||||
@@ -113,6 +113,8 @@ public interface JedisCommands {
|
||||
|
||||
String srandmember(String key);
|
||||
|
||||
List<String> srandmember(String key, int count);
|
||||
|
||||
Long strlen(String key);
|
||||
|
||||
Long zadd(String key, double score, String member);
|
||||
|
||||
@@ -346,6 +346,12 @@ public class ShardedJedis extends BinaryShardedJedis implements JedisCommands,
|
||||
return j.srandmember(key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> srandmember(String key, int count) {
|
||||
Jedis j = getShard(key);
|
||||
return j.srandmember(key, count);
|
||||
}
|
||||
|
||||
public Long zadd(String key, double score, String member) {
|
||||
Jedis j = getShard(key);
|
||||
return j.zadd(key, score, member);
|
||||
|
||||
Reference in New Issue
Block a user