Implemented SLAVEOF
This commit is contained in:
@@ -539,4 +539,12 @@ public class Client extends Connection {
|
|||||||
public void monitor() {
|
public void monitor() {
|
||||||
sendCommand("MONITOR");
|
sendCommand("MONITOR");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void slaveof(String host, int port) {
|
||||||
|
sendCommand("SLAVEOF", host, String.valueOf(port));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void slaveofNoOne() {
|
||||||
|
sendCommand("SLAVEOF", "no", "one");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -643,4 +643,15 @@ public class Jedis {
|
|||||||
client.monitor();
|
client.monitor();
|
||||||
jedisMonitor.proceed(client);
|
jedisMonitor.proceed(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String slaveof(String host, int port) {
|
||||||
|
client.slaveof(host, port);
|
||||||
|
return client.getStatusCodeReply();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String slaveofNoOne() {
|
||||||
|
client.slaveofNoOne();
|
||||||
|
return client.getStatusCodeReply();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user