Mercurial > hg > Database > Christie
comparison src/main/java/christie/topology/node/TopologyNode.java @ 94:87a203c99177
update HostMessage refactor
author | akahori |
---|---|
date | Sat, 15 Sep 2018 18:59:12 +0900 |
parents | 33afa0fa8bc5 |
children | 53e31b403815 |
comparison
equal
deleted
inserted
replaced
93:7abfe041b75c | 94:87a203c99177 |
---|---|
22 | 22 |
23 cgm.createRemoteDGM(topologyNodeConfig.getManagerKey(), | 23 cgm.createRemoteDGM(topologyNodeConfig.getManagerKey(), |
24 topologyNodeConfig.getManagerHostName(), | 24 topologyNodeConfig.getManagerHostName(), |
25 topologyNodeConfig.getManagerPort()); | 25 topologyNodeConfig.getManagerPort()); |
26 | 26 |
27 HostMessage hostMessage = new HostMessage(); | |
28 hostMessage.setLocalHostAndPort(cgm.localPort); | |
29 hostMessage.setCookie(topologyNodeConfig.cookie); | |
27 | 30 |
28 String localHostName = null; | 31 getDGM(topologyNodeConfig.getManagerKey()).put("hostMessage", hostMessage); |
29 try { | |
30 localHostName = InetAddress.getLocalHost().getHostAddress(); | |
31 } catch (UnknownHostException e) { | |
32 e.printStackTrace(); | |
33 } | |
34 | |
35 HostMessage host = new HostMessage(localHostName, cgm.localPort); | |
36 host.cookie = topologyNodeConfig.cookie; | |
37 | |
38 getDGM(topologyNodeConfig.getManagerKey()).put("hostMessage", host); | |
39 | 32 |
40 getLocalDGM().put("_CLIST", new ArrayList<String>()); | 33 getLocalDGM().put("_CLIST", new ArrayList<String>()); |
41 getLocalDGM().put("reverseCount", 0); | 34 getLocalDGM().put("reverseCount", 0); |
42 | 35 |
43 cgm.setup(new IncomingConnectionInfo()); | 36 cgm.setup(new IncomingConnectionInfo()); |