Mercurial > hg > Database > Christie-sharp
view topology/manager/TopologyManager.cs @ 61:1a42115e51bb
fix
author | KaitoMaeshiro <aosskaito@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 28 Jan 2022 23:15:05 +0900 |
parents | c4f8630b7822 |
children | 312de6b900bc |
line wrap: on
line source
using System; using System.Collections.Generic; using Christie_net.annotation; using Christie_net.codegear; namespace Christie_net.topology.manager { public class TopologyManager : CodeGear { [Peek] public TopologyManagerConfig topologyManagerConfig; public TopologyManager() { } public override void Run(CodeGearManager cgm) { cgm.Setup(new CheckComingHost()); GetLocalDgm().Put("absCookieTable", new Dictionary<String, String>()); if(topologyManagerConfig.dynamic) { GetLocalDgm().Put("running", true); GetLocalDgm().Put("_STARTMESSAGE", new Message()); if (topologyManagerConfig.type == TopologyType.Tree) { GetLocalDgm().Put("parentManager", new ParentManager(topologyManagerConfig.hasChild)); GetLocalDgm().Put("nameTable", new Dictionary<String, HostMessage>()); GetLocalDgm().Put("hostCount", 0); cgm.Setup(new CreateTreeTopology()); //cgm.setup(new ReceiveDisconnectMessage()); }else{ GetLocalDgm().Put("running", false); //cgm.Setup(new FileParser()); cgm.Setup(new IncomingHosts()); cgm.Setup(new ConfigWaiter()); } cgm.Setup(new CreateHash()); cgm.Setup(new TopologyFinish()); GetLocalDgm().Put("topology", new Dictionary<String, LinkedList<HostMessage>>()); GetLocalDgm().Put("createdList", new LinkedList<String>()); } } } }