comparison src/main/java/alice/topology/node/StartTopologyNode.java @ 419:aefbe41fcf12 dispose

change tab to space
author sugi
date Tue, 15 Jul 2014 16:00:22 +0900
parents fee3efd9257d
children 6a5925219dc6
comparison
equal deleted inserted replaced
418:a269a019f5f8 419:aefbe41fcf12
6 import alice.datasegment.DataSegment; 6 import alice.datasegment.DataSegment;
7 import alice.topology.HostMessage; 7 import alice.topology.HostMessage;
8 8
9 public class StartTopologyNode extends CodeSegment { 9 public class StartTopologyNode extends CodeSegment {
10 10
11 private TopologyNodeConfig conf; 11 private TopologyNodeConfig conf;
12 private CodeSegment startCS; 12 private CodeSegment startCS;
13 13
14 public StartTopologyNode(TopologyNodeConfig conf, CodeSegment startCS) { 14 public StartTopologyNode(TopologyNodeConfig conf, CodeSegment startCS) {
15 this.conf = conf; 15 this.conf = conf;
16 this.startCS = startCS; 16 this.startCS = startCS;
17 } 17 }
18 18
19 @Override 19 @Override
20 public void run() { 20 public void run() {
21 ods.put("running", false); 21 ods.put("running", false);
22 DataSegment.connect("manager", "", conf.getManagerHostName(), conf.getManagerPort()); 22 DataSegment.connect("manager", "", conf.getManagerHostName(), conf.getManagerPort());
23 String localHostName = null; 23 String localHostName = null;
24 try { 24 try {
25 localHostName = InetAddress.getLocalHost().getHostName(); 25 localHostName = InetAddress.getLocalHost().getHostName();
26 } catch (UnknownHostException e) { 26 } catch (UnknownHostException e) {
27 e.printStackTrace(); 27 e.printStackTrace();
28 } 28 }
29 29
30 HostMessage host = new HostMessage(localHostName, conf.localPort); 30 HostMessage host = new HostMessage(localHostName, conf.localPort);
31 ods.put("manager", "host", host); 31 ods.put("manager", "host", host);
32 32
33 IncomingAbstractHostName cs = new IncomingAbstractHostName(); 33 IncomingAbstractHostName cs = new IncomingAbstractHostName();
34 cs.absName.setKey("local", "host"); 34 cs.absName.setKey("local", "host");
35 35
36 IncomingReverseKey cs2 = new IncomingReverseKey(); 36 IncomingReverseKey cs2 = new IncomingReverseKey();
37 cs2.reverseKey.setKey("local", "reverseKey"); 37 cs2.reverseKey.setKey("local", "reverseKey");
38 cs2.reverseCount.setKey("local", "reverseCount"); 38 cs2.reverseCount.setKey("local", "reverseCount");
39 39
40 ods.put("local", "reverseCount", 0); 40 ods.put("local", "reverseCount", 0);
41 41
42 ConfigurationFinish cs3 = new ConfigurationFinish(startCS); 42 ConfigurationFinish cs3 = new ConfigurationFinish(startCS);
43 cs3.reverseCount.setKey("local", "reverseCount"); 43 cs3.reverseCount.setKey("local", "reverseCount");
44 cs3.configNodeNum.setKey("local", "configNodeNum"); 44 cs3.configNodeNum.setKey("local", "configNodeNum");
45 45
46 } 46 }
47 47
48 } 48 }