diff --git a/ws2012/P2P/uebungen/11/src/node/Node.java b/ws2012/P2P/uebungen/11/src/node/Node.java index 992e55bd..74367925 100644 --- a/ws2012/P2P/uebungen/11/src/node/Node.java +++ b/ws2012/P2P/uebungen/11/src/node/Node.java @@ -390,13 +390,17 @@ public class Node { return routingTable.getEntries(); } - public void storePair(Identifier key, NodeIdentifier id) { - values.put(key, id); + public void storePair(Identifier key, Identifier nodeid) { + values.put(key, nodeid); } public void store(Identifier key) { + + storePair(key,this.nodeID); + Set nodes = routingTable.getClosestNodesTo(key); + for (NodeIdentifier node : nodes) { sendStore(node, key); } @@ -405,6 +409,7 @@ public class Node { public void findValue(Identifier key) { Set nodes = routingTable.getClosestNodesTo(key); + for (NodeIdentifier node : nodes) { sendFindValue(node, key); }