diff options
Diffstat (limited to 'java/sca/modules/endpoint-dht')
-rw-r--r-- | java/sca/modules/endpoint-dht/src/main/java/org/apache/tuscany/sca/endpoint/dht/OverlayEndpointRegistry.java | 34 |
1 files changed, 0 insertions, 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.<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(); |