view src/main/java/christie/topology/manager/TopologyManagerConfig.java @ 50:8dfd93810041

fix config and HostMessage
author akahori
date Thu, 23 Aug 2018 09:30:36 +0900
parents 174a2f37ec28
children e2ce8038815a
line wrap: on
line source

package christie.topology.manager;

import christie.daemon.Config;

public class TopologyManagerConfig extends Config {
    public boolean showTime = false;
    public String confFilePath;
    public TopologyType type = TopologyType.Tree;
    public int hasChild = 2;

    public TopologyManagerConfig(String[] args) {
        super(args);
        for (int i = 0; i < args.length; i++) {
            if ("--confFile".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;
            }
        }
    }
}