@Override public boolean execute(TextUI console, Iterator<String> args) throws IllegalParametersException { Set<String> replicas = JDG.replicaValuesFromKeys(cache); for (String key : replicas) { console.println(key); } console.println("Cache Size: " + cache.size() + "\n"); console.println("Replica Size: " + replicas.size() + "\n"); return true; }
@Override public void usage(TextUI console) { console.println(COMMAND_NAME); console.println("\t\tList all local valuesFromKeys for which this node is a replica."); }