Mercurial > hg > Database > Christie
diff src/main/java/christie/topology/node/IncomingConnectionInfo.java @ 66:4e2453333508
del IncomingAbstractHostName
author | akahori |
---|---|
date | Thu, 30 Aug 2018 11:06:34 +0900 |
parents | 5deea416f980 |
children | 37601b98f0da |
line wrap: on
line diff
--- a/src/main/java/christie/topology/node/IncomingConnectionInfo.java Thu Aug 30 10:56:37 2018 +0900 +++ b/src/main/java/christie/topology/node/IncomingConnectionInfo.java Thu Aug 30 11:06:34 2018 +0900 @@ -1,6 +1,7 @@ package christie.topology.node; +import christie.annotation.Peek; import christie.annotation.Take; import christie.codegear.CodeGear; import christie.codegear.CodeGearManager; @@ -8,37 +9,39 @@ import org.apache.log4j.Logger; public class IncomingConnectionInfo extends CodeGear { + @Peek + TopologyNodeConfig topologyNodeConfig; + + @Peek + String nodeName; @Take HostMessage remoteNodeInfo; - private String absName; - private int count; - private Logger log = Logger.getLogger(IncomingConnectionInfo.class); - private String managerKey; + @Take + int count; - public IncomingConnectionInfo(String absName, int count, String managerKey) { - this.absName = absName; - this.count = count; - this.managerKey = managerKey; - //remoteNodeInfo.setKey(managerKey,absName); + private Logger log = Logger.getLogger(IncomingConnectionInfo.class); + + + public IncomingConnectionInfo() { } @Override protected void run(CodeGearManager cgm) { - + String managerKey = topologyNodeConfig.getManagerKey(); log.info(remoteNodeInfo.toString()); if ( remoteNodeInfo.hostName.equals("")) { // end case - log.info(" topology node finished " + absName); + log.info(" topology node finished " + nodeName); getLocalDGM().put("configNodeNum", 0); return ; } - log.info("topology node " + absName + " will connect to " + remoteNodeInfo.hostName ); + log.info("topology node " + nodeName + " will connect to " + remoteNodeInfo.hostName ); if (cgm.getDgmList().contains(remoteNodeInfo.connectionName)) { // need to wait remove by DeleteConnection - getDGM("manager").put(absName, remoteNodeInfo); + getDGM("manager").put(nodeName, remoteNodeInfo); } else { cgm.createRemoteDGM(remoteNodeInfo.connectionName, remoteNodeInfo.hostName, remoteNodeInfo.port); @@ -52,7 +55,8 @@ cgm.setup(new CreateConnectionList()); } - cgm.setup(new IncomingConnectionInfo(absName, count, managerKey)); + cgm.setup(new IncomingConnectionInfo()); + getLocalDGM().put("count", count); } }