41
|
1 package christie.topology.manager;
|
|
2
|
48
|
3 import christie.daemon.Config;
|
|
4
|
|
5 public class TopologyManagerConfig extends Config {
|
41
|
6 public boolean showTime = false;
|
|
7 public String confFilePath;
|
|
8 public TopologyType type = TopologyType.Tree;
|
|
9 public int hasChild = 2;
|
|
10
|
|
11 public TopologyManagerConfig(String[] args) {
|
48
|
12 super(args);
|
41
|
13 for (int i = 0; i < args.length; i++) {
|
46
|
14 if ("--confFile".equals(args[i])) {
|
41
|
15 confFilePath = args[++i];
|
46
|
16 } else if ("--topology".equals(args[i])) {
|
41
|
17 String typeName = args[++i];
|
|
18 if ("tree".equals(typeName)) {
|
|
19 type = TopologyType.Tree;
|
|
20 }
|
46
|
21 } else if ("--child".equals(args[i])) {
|
41
|
22 hasChild = Integer.parseInt(args[++i]);
|
|
23 } else if ("--showTime".equals(args[i])) {
|
|
24 showTime = true;
|
|
25 }
|
|
26 }
|
|
27 }
|
|
28 }
|