Mercurial > hg > Database > Christie
diff src/main/java/christie/topology/manager/TopologyManagerConfig.java @ 41:cf5a75bc3e55
add
author | akahori |
---|---|
date | Tue, 31 Jul 2018 17:46:32 +0900 |
parents | |
children | 21cf500585d1 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/christie/topology/manager/TopologyManagerConfig.java Tue Jul 31 17:46:32 2018 +0900 @@ -0,0 +1,27 @@ +package christie.topology.manager; + +public class TopologyManagerConfig { + public boolean showTime = false; + public String confFilePath; + public TopologyType type = TopologyType.Tree; + public int hasChild = 2; + + public TopologyManagerConfig(String[] args) { + + for (int i = 0; i < args.length; i++) { + if ("-conf".equals(args[i])) { + confFilePath = args[++i]; + } else if ("--Topology".equals(args[i])) { + String typeName = args[++i]; + if ("tree".equals(typeName)) { + type = TopologyType.Tree; + } + } else if ("--Child".equals(args[i])) { + hasChild = Integer.parseInt(args[++i]); + } else if ("--showTime".equals(args[i])) { + showTime = true; + } + } + + } +}