From 38547ebb3eb90c6ca728261adb80936528fd69d2 Mon Sep 17 00:00:00 2001 From: giorgio Date: Sat, 19 Sep 2009 23:41:22 +0000 Subject: A quick fix git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@816967 13f79535-47bb-0310-9956-ffa450edef68 --- .../sca/endpoint/dht/OverlayEndpointRegistry.java | 34 ---------------------- 1 file changed, 34 deletions(-) diff --git a/java/sca/modules/endpoint-dht/src/main/java/org/apache/tuscany/sca/endpoint/dht/OverlayEndpointRegistry.java b/java/sca/modules/endpoint-dht/src/main/java/org/apache/tuscany/sca/endpoint/dht/OverlayEndpointRegistry.java index 1bbf042379..6cf955bd70 100644 --- a/java/sca/modules/endpoint-dht/src/main/java/org/apache/tuscany/sca/endpoint/dht/OverlayEndpointRegistry.java +++ b/java/sca/modules/endpoint-dht/src/main/java/org/apache/tuscany/sca/endpoint/dht/OverlayEndpointRegistry.java @@ -271,40 +271,6 @@ public class OverlayEndpointRegistry implements EndpointRegistry, LifeCycleListe public void entryUpdated(Object key, Object oldValue, Object newValue) { /* TODO*/ } - - public static void main(String[] args) throws Exception { - DHTConfiguration config = DHTFactory.getDefaultConfiguration(); - /* the DHT behaviour should be configurable */ - config.setRoutingStyle("Iterative"); - config.setRoutingAlgorithm("Pastry"); - config.setSelfPort(DEFAULT_PORT); - try { - map = DHTFactory.getDHT(config); - } - catch (Exception e) { - throw new IllegalStateException(e); - } - - try { - map.joinOverlay(address, joinPort); - } - catch (IOException e) { - throw new IllegalStateException(e); - } - map.put(UUID.randomUUID().toString(), localhost.getHostAddress()); - for (int i = 0; i < 4; i++) { - Thread.sleep(3000); - System.out.println(localhost + ": " + map.keySet()); - } - for (Object e : map.entrySetFull()) { - Map.Entry en = (Map.Entry)e; - AbstractReplicatedMap.MapEntry entry = (AbstractReplicatedMap.MapEntry)en.getValue(); - System.out.println(entry); - } - map.breakdown(); - channel.stop(Channel.DEFAULT); - } - private static String getBindAddress() { try { Enumeration nis = NetworkInterface.getNetworkInterfaces(); -- cgit v1.2.3