changeset 57:f4b388422045

fix public to protected run
author akahori
date Fri, 24 Aug 2018 11:11:21 +0900
parents 1850b3eb93d8
children 9922e6decbe8
files src/main/java/christie/topology/manager/CheckComingHost.java src/main/java/christie/topology/manager/ConfigWaiter.java src/main/java/christie/topology/manager/IncomingHosts.java src/main/java/christie/topology/manager/RecordTopology.java
diffstat 4 files changed, 10 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/src/main/java/christie/topology/manager/CheckComingHost.java	Thu Aug 23 11:01:30 2018 +0900
+++ b/src/main/java/christie/topology/manager/CheckComingHost.java	Fri Aug 24 11:11:21 2018 +0900
@@ -20,7 +20,7 @@
     }
 
     @Override
-    public void run(CodeGearManager cgm) {
+    protected void run(CodeGearManager cgm) {
 
         // check cookie
         if (hostMessage.cookie != null) {
--- a/src/main/java/christie/topology/manager/ConfigWaiter.java	Thu Aug 23 11:01:30 2018 +0900
+++ b/src/main/java/christie/topology/manager/ConfigWaiter.java	Fri Aug 24 11:11:21 2018 +0900
@@ -20,7 +20,7 @@
     public ConfigWaiter() { }
 
     @Override
-    public void run(CodeGearManager cgm) {
+    protected void run(CodeGearManager cgm) {
         nodeNum--;
         if (nodeNum == 0) {
             getLocalDGM().put("start", ValueFactory.createNilValue());
--- a/src/main/java/christie/topology/manager/IncomingHosts.java	Thu Aug 23 11:01:30 2018 +0900
+++ b/src/main/java/christie/topology/manager/IncomingHosts.java	Fri Aug 24 11:11:21 2018 +0900
@@ -29,7 +29,6 @@
     @Take
     String MD5;
 
-
     private Logger log = Logger.getLogger(IncomingHosts.class);
 
     public IncomingHosts() {
@@ -37,8 +36,7 @@
     }
 
     @Override
-    public void run(CodeGearManager cgm) {
-
+    protected void run(CodeGearManager cgm) {
         // not have or match cookie
         String nodeName = nodeNames.poll();
 
@@ -61,10 +59,12 @@
             hostMessage.remoteAbsName = nodeInfo.sourceNodeName;
 
             getLocalDGM().put("nodeInfo", hostMessage);
-            getLocalDGM().put(nodeInfo.sourceNodeName, hostMessage);
+
+            // TODO: ここをTopologyNodeのIncommingConnectionInfoにおくれるようにしないと, 動かない.
+            //getLocalDGM().put("hostInfo", hostMessage);
             log.info(" write to " + nodeInfo.sourceNodeName + " config message =" + hostMessage.toString() + " remain "
                     + Integer.toString((nodeNames.size())));
-            // RecordTopologyは, !conf.dynamic のときは呼ばれない.
+
             cgm.setup(new RecordTopology());
         }
 
@@ -73,7 +73,7 @@
             // configuration finish
             for (String key : resultParse.keySet()) {
                 log.info(" write to " + key + " end message =" + (new HostMessage("",0,"","")).toString());
-                getLocalDGM().put(key, new HostMessage("",0,"","")); // end mark
+                getDGM(key).put("hostInfo", new HostMessage("",0,"","")); // end mark
             }
         }
 
--- a/src/main/java/christie/topology/manager/RecordTopology.java	Thu Aug 23 11:01:30 2018 +0900
+++ b/src/main/java/christie/topology/manager/RecordTopology.java	Fri Aug 24 11:11:21 2018 +0900
@@ -17,10 +17,9 @@
 
     @Peek
     HashMap<String, LinkedList<HostMessage>> topology;
-    public RecordTopology(){ }
 
     @Override
-    public void run(CodeGearManager cgm) {
+    protected void run(CodeGearManager cgm) {
         LinkedList<HostMessage> connections;
         if (!topology.containsKey(nodeInfo.remoteAbsName)) {
             connections = new LinkedList<HostMessage>();
@@ -38,7 +37,7 @@
 //            System.out.println();
 //        }
 
-        //ods.update(info1.key, topology);
+        //getLocalDGM().put("topology", topology);
     }
 
 }