Apply binary PF* commands to BinaryJedis, BinaryShardedJedis
* Apply binary PF* commands to BinaryJedis, BinaryShardedJedis * binary PF* commands to interface ** pfadd / pfcount : BinaryJedisCommands ** pfmerge : MultiKeyBinaryCommands
This commit is contained in:
@@ -3417,4 +3417,25 @@ public class BinaryJedis implements BasicCommands, BinaryJedisCommands,
|
||||
return client.getIntegerReply();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long pfadd(final byte[] key, final byte[]... elements) {
|
||||
checkIsInMulti();
|
||||
client.pfadd(key, elements);
|
||||
return client.getIntegerReply();
|
||||
}
|
||||
|
||||
@Override
|
||||
public long pfcount(final byte[] key) {
|
||||
checkIsInMulti();
|
||||
client.pfcount(key);
|
||||
return client.getIntegerReply();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String pfmerge(final byte[] destkey, final byte[]... sourcekeys) {
|
||||
checkIsInMulti();
|
||||
client.pfmerge(destkey, sourcekeys);
|
||||
return client.getStatusCodeReply();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -211,4 +211,8 @@ public interface BinaryJedisCommands {
|
||||
Long bitcount(final byte[] key);
|
||||
|
||||
Long bitcount(final byte[] key, long start, long end);
|
||||
|
||||
Long pfadd(final byte[] key, final byte[]... elements);
|
||||
|
||||
long pfcount(final byte[] key);
|
||||
}
|
||||
|
||||
@@ -569,4 +569,17 @@ public class BinaryShardedJedis extends Sharded<Jedis, JedisShardInfo>
|
||||
Jedis j = getShard(key);
|
||||
return j.bitcount(key, start, end);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long pfadd(final byte[] key, final byte[]... elements) {
|
||||
Jedis j = getShard(key);
|
||||
return j.pfadd(key, elements);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long pfcount(final byte[] key) {
|
||||
Jedis j = getShard(key);
|
||||
return j.pfcount(key);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -69,4 +69,6 @@ public interface MultiKeyBinaryCommands {
|
||||
byte[] randomBinaryKey();
|
||||
|
||||
Long bitop(BitOP op, final byte[] destKey, byte[]... srcKeys);
|
||||
|
||||
String pfmerge(final byte[] destkey, final byte[]... sourcekeys);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user