public class KeyValueStore implements StateMachine {
private Map<String, Object> data = new HashMap<>();
public static void main(String[] args) {
LocalClusterConfig clusterConfig = new LocalClusterConfig();
clusterConfig.setLocalMember("tcp://localhost:8080");
clusterConfig.setRemoteMembers("tcp://localhost:8081", "tcp://localhost:8082");
Copycat.builder()
.withStateMachine(new KeyValueStore())
.withLog(new InMemoryLog())
.withCluster(new Cluster(clusterConfig))