summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgiorgio <giorgio@13f79535-47bb-0310-9956-ffa450edef68>2009-09-19 23:41:22 +0000
committergiorgio <giorgio@13f79535-47bb-0310-9956-ffa450edef68>2009-09-19 23:41:22 +0000
commit38547ebb3eb90c6ca728261adb80936528fd69d2 (patch)
treece7b9c52e0c4bd7b3f9ed16b151372076dc90168
parent2d034c5660ff6e2aa39ca2983abfdb1df51dfa88 (diff)
A quick fix
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@816967 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--java/sca/modules/endpoint-dht/src/main/java/org/apache/tuscany/sca/endpoint/dht/OverlayEndpointRegistry.java34
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();