You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by gi...@apache.org on 2009/09/20 01:41:23 UTC

svn commit: r816967 - /tuscany/java/sca/modules/endpoint-dht/src/main/java/org/apache/tuscany/sca/endpoint/dht/OverlayEndpointRegistry.java

Author: giorgio
Date: Sat Sep 19 23:41:22 2009
New Revision: 816967

URL: http://svn.apache.org/viewvc?rev=816967&view=rev
Log:
A quick fix

Modified:
    tuscany/java/sca/modules/endpoint-dht/src/main/java/org/apache/tuscany/sca/endpoint/dht/OverlayEndpointRegistry.java

Modified: tuscany/java/sca/modules/endpoint-dht/src/main/java/org/apache/tuscany/sca/endpoint/dht/OverlayEndpointRegistry.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/endpoint-dht/src/main/java/org/apache/tuscany/sca/endpoint/dht/OverlayEndpointRegistry.java?rev=816967&r1=816966&r2=816967&view=diff
==============================================================================
--- tuscany/java/sca/modules/endpoint-dht/src/main/java/org/apache/tuscany/sca/endpoint/dht/OverlayEndpointRegistry.java (original)
+++ tuscany/java/sca/modules/endpoint-dht/src/main/java/org/apache/tuscany/sca/endpoint/dht/OverlayEndpointRegistry.java Sat Sep 19 23:41:22 2009
@@ -271,40 +271,6 @@
     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.<Endpoint>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<NetworkInterface> nis = NetworkInterface.getNetworkInterfaces();