Package com.dianping.cat.home.dependency.config.entity

Examples of com.dianping.cat.home.dependency.config.entity.NodeConfig


    edgeConfig.setErrorThreshold(config.getErrorThreshold());
    return edgeConfig;
  }

  public boolean deleteDomainConfig(String type, String domain) {
    NodeConfig types = m_config.getNodeConfigs().get(type);
    types.removeDomainConfig(domain);
    return storeConfig();
  }
View Full Code Here


    m_config.findOrCreateNodeConfig(type).addDomainConfig(config);
    return storeConfig();
  }

  public boolean insertDomainDefaultConfig(String type, DomainConfig config) {
    NodeConfig node = m_config.findOrCreateNodeConfig(type);

    node.setDefaultErrorResponseTime(config.getErrorResponseTime());
    node.setDefaultErrorThreshold(config.getErrorThreshold());
    node.setDefaultWarningResponseTime(config.getWarningResponseTime());
    node.setDefaultWarningThreshold(config.getWarningThreshold());
    return storeConfig();
  }
View Full Code Here

    }
    return edgeConfig;
  }

  public DomainConfig queryNodeConfig(String type, String domain) {
    NodeConfig typesConfig = m_config.findNodeConfig(type);

    if (typesConfig != null) {
      DomainConfig config = typesConfig.findDomainConfig(domain);
      if (config == null) {
        config = new DomainConfig();

        config.setId(domain);
        config.setErrorResponseTime(typesConfig.getDefaultErrorResponseTime());
        config.setErrorThreshold(typesConfig.getDefaultErrorThreshold());
        config.setWarningResponseTime(typesConfig.getDefaultWarningResponseTime());
        config.setWarningThreshold(typesConfig.getDefaultWarningThreshold());
      }
      return config;
    }
    return null;
  }
View Full Code Here

TOP

Related Classes of com.dianping.cat.home.dependency.config.entity.NodeConfig

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.