Move pfcount(keys) method to multikey interfaces
This commit is contained in:
@@ -1503,16 +1503,4 @@ public class JedisCluster implements JedisCommands, BasicCommands {
|
||||
}
|
||||
}.run(key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long pfcount(final String... keys) {
|
||||
return new JedisClusterCommand<Long>(connectionHandler,
|
||||
timeout, maxRedirections) {
|
||||
@Override
|
||||
public Long execute(Jedis connection) {
|
||||
return connection.pfcount(keys);
|
||||
}
|
||||
}.run(keys[0]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -245,5 +245,4 @@ public interface JedisCommands {
|
||||
|
||||
long pfcount(final String key);
|
||||
|
||||
long pfcount(final String...keys);
|
||||
}
|
||||
|
||||
@@ -81,4 +81,6 @@ public interface MultiKeyCommands {
|
||||
ScanResult<String> scan(final String cursor);
|
||||
|
||||
String pfmerge(final String destkey, final String... sourcekeys);
|
||||
|
||||
long pfcount(final String...keys);
|
||||
}
|
||||
|
||||
@@ -66,4 +66,6 @@ public interface MultiKeyCommandsPipeline {
|
||||
Response<Long> bitop(BitOP op, final String destKey, String... srcKeys);
|
||||
|
||||
Response<String> pfmerge(final String destkey, final String... sourcekeys);
|
||||
|
||||
Response<Long> pfcount(final String...keys);
|
||||
}
|
||||
|
||||
@@ -458,4 +458,10 @@ abstract class MultiKeyPipelineBase extends PipelineBase implements
|
||||
client.pfmerge(destkey, sourcekeys);
|
||||
return getResponse(BuilderFactory.STRING);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Response<Long> pfcount(String...keys) {
|
||||
client.pfcount(keys);
|
||||
return getResponse(BuilderFactory.LONG);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -582,11 +582,4 @@ public class ShardedJedis extends BinaryShardedJedis implements JedisCommands {
|
||||
Jedis j = getShard(key);
|
||||
return j.pfcount(key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long pfcount(String... keys) {
|
||||
//The command will be sent to the first shard.
|
||||
Jedis j = getShard(keys[0]);
|
||||
return j.pfcount(keys);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user