Mercurial > hg > Database > Christie
changeset 118:daf37151dd97
refactor constract StartTopologyManage and StartTopologyNode
author | akahori |
---|---|
date | Fri, 07 Dec 2018 23:29:18 +0900 |
parents | 53e31b403815 |
children | 558daa2f106e |
files | src/main/java/christie/topology/manager/TopologyManager.java src/main/java/christie/topology/node/StartTopologyNode.java |
diffstat | 2 files changed, 3 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/christie/topology/manager/TopologyManager.java Thu Dec 06 23:07:26 2018 +0900 +++ b/src/main/java/christie/topology/manager/TopologyManager.java Fri Dec 07 23:29:18 2018 +0900 @@ -24,12 +24,12 @@ if(topologyManagerConfig.dynamic) { getLocalDGM().put("running", true); + getLocalDGM().put("start", "start"); if (topologyManagerConfig.type == TopologyType.Tree) { getLocalDGM().put("parentManager", new ParentManager(topologyManagerConfig.hasChild)); getLocalDGM().put("nameTable", new HashMap<String, HostMessage>()); getLocalDGM().put("hostCount", 0); - cgm.setup(new CreateTreeTopology()); //cgm.setup(new ReceiveDisconnectMessage()); } @@ -47,7 +47,6 @@ getLocalDGM().put("topology", new HashMap<String, HashMap<String, HostMessage>>()); getLocalDGM().put("createdList", new LinkedList<String>()); - }
--- a/src/main/java/christie/topology/node/StartTopologyNode.java Thu Dec 06 23:07:26 2018 +0900 +++ b/src/main/java/christie/topology/node/StartTopologyNode.java Fri Dec 07 23:29:18 2018 +0900 @@ -10,22 +10,10 @@ super(cgm); cgm.getLocalDGM().put("startCG", startCG); cgm.getLocalDGM().put("topologyNodeConfig", conf); - + cgm.setup(new TopologyNode()); } public StartTopologyNode(TopologyNodeConfig conf, CodeGear startCG) { - super(createCGM(conf.localPort)); - getLocalDGM().put("startCG", startCG); - getLocalDGM().put("topologyNodeConfig", conf); - + this(createCGM(conf.localPort), conf, startCG); } - - - - @Override - protected void run(CodeGearManager cgm) { - cgm.setup(new TopologyNode()); - - } - }