Add a sendCommand(String byte[]...) method.

This commit is contained in:
Yaourt
2010-11-04 10:31:20 +01:00
parent ddd3932906
commit 377c266dc1

View File

@@ -62,6 +62,19 @@ public class Connection {
return this;
}
protected Connection sendCommand(final String name, final byte[]... args) {
try {
connect();
} catch (UnknownHostException e) {
throw new JedisException("Could not connect to redis-server", e);
} catch (IOException e) {
throw new JedisException("Could not connect to redis-server", e);
}
protocol.sendCommand(outputStream, name, args);
pipelinedCommands++;
return this;
}
public Connection(final String host, final int port) {
super();
this.host = host;