Apply PF* (string, binary) commands to Pipeline

* Apply PF* (string, binary) commands to Pipeline
* PF* Pipeline (string, binary) commands to interface
** pfadd / pfcount : BinaryRedisPipeline, RedisPipeline
** pfmerge : MultiKeyBinaryRedisPipeline, MultiKeyCommandsPipeline
This commit is contained in:
Jungtaek Lim
2014-04-05 23:48:49 +09:00
parent 11f05ec161
commit c2cf79c972
9 changed files with 51 additions and 4 deletions

View File

@@ -1204,4 +1204,28 @@ abstract class PipelineBase extends Queable implements BinaryRedisPipeline,
return getResponse(BuilderFactory.STRING);
}
@Override
public Response<Long> pfadd(byte[] key, byte[]... elements) {
getClient(key).pfadd(key, elements);
return getResponse(BuilderFactory.LONG);
}
@Override
public Response<Long> pfcount(byte[] key) {
getClient(key).pfcount(key);
return getResponse(BuilderFactory.LONG);
}
@Override
public Response<Long> pfadd(String key, String... elements) {
getClient(key).pfadd(key, elements);
return getResponse(BuilderFactory.LONG);
}
@Override
public Response<Long> pfcount(String key) {
getClient(key).pfcount(key);
return getResponse(BuilderFactory.LONG);
}
}