package redis.embedded.cluster;

import redis.clients.jedis.*;

import java.io.*;

// TODO Remove dependency on Jedis
class Client implements Closeable {

    private final Jedis jedis;

    Client(String host, int port) {
        this.jedis = new Jedis(host, port);
    }

    public String clusterReplicate(final String nodeId) {
        return jedis.clusterReplicate(nodeId);
    }

    public void close() {
        jedis.close();
    }

    public String clusterAddSlots(final int... slots) {
        return jedis.clusterAddSlots(slots);
    }

    public String clusterNodes() {
        return jedis.clusterNodes();
    }

    public String getNodeId() {
        return clusterNodes().split(" :")[0];
    }

    public String clusterMeet(final String ip, final int port) {
        return jedis.clusterMeet(ip, port);
    }

    public String clusterInfo() {
        return jedis.clusterInfo();
    }
}

@@ -81,41 +81,281 @@
 ;%0A%0A/
-/ TODO%C2%A0Remove dependency on Jedis
+**%0A * A minimal client implementation to pass some commands to a single redis server.%0A * This implementation rely on Jedis to make the all calls (removing the dependency on Jedis could be done%0A * but will add a serious complexity to this project, hence the dependency).%0A */
 %0Acla

Add explanation as to why we depend on Jedis