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

Examples of com.dianping.cat.home.dependency.exception.entity.DomainConfig


  public static String DEFAULT_STRING = "Default";

  public static String TOTAL_STRING = "Total";

  public boolean deleteExceptionExclude(String domain, String exceptionName) {
    DomainConfig domainConfig = m_exceptionConfig.findOrCreateDomainConfig(domain);

    domainConfig.removeExceptionExclude(exceptionName);
    return storeConfig();
  }
View Full Code Here


    domainConfig.removeExceptionExclude(exceptionName);
    return storeConfig();
  }

  public boolean deleteExceptionLimit(String domain, String exceptionName) {
    DomainConfig domainConfig = m_exceptionConfig.findOrCreateDomainConfig(domain);
    domainConfig.removeExceptionLimit(exceptionName);
    return storeConfig();
  }
View Full Code Here

      m_exceptionConfig = new ExceptionConfig();
    }
  }

  public boolean insertExceptionExclude(ExceptionExclude exception) {
    DomainConfig domainConfig = m_exceptionConfig.findOrCreateDomainConfig(exception.getDomain());

    domainConfig.getExceptionExcludes().put(exception.getId(), exception);
    return storeConfig();
  }
View Full Code Here

    domainConfig.getExceptionExcludes().put(exception.getId(), exception);
    return storeConfig();
  }

  public boolean insertExceptionLimit(ExceptionLimit limit) {
    DomainConfig domainConfig = m_exceptionConfig.findOrCreateDomainConfig(limit.getDomain());
    domainConfig.getExceptionLimits().put(limit.getId(), limit);
   
    return storeConfig();
  }
View Full Code Here

    }
    return result;
  }

  private ExceptionExclude queryDefaultExceptionExclude(String exceptionName) {
    DomainConfig domainConfig = m_exceptionConfig.getDomainConfigs().get(DEFAULT_STRING);
    ExceptionExclude result = null;

    if (domainConfig != null) {
      result = domainConfig.getExceptionExcludes().get(exceptionName);
    }
    return result;
  }
View Full Code Here

    }
    return result;
  }

  public ExceptionExclude queryDomainExceptionExclude(String domain, String exceptionName) {
    DomainConfig domainConfig = m_exceptionConfig.getDomainConfigs().get(domain);
    ExceptionExclude result = null;

    // has no this domain config
    if (domainConfig == null) {
      result = queryDefaultExceptionExclude(exceptionName);
    }

    if (domainConfig != null) {
      result = domainConfig.getExceptionExcludes().get(exceptionName);
      // domain config has no exclude for exception, check default exclude config
      if (result == null) {
        result = queryDefaultExceptionExclude(exceptionName);
      }
    }
View Full Code Here

    }
    return result;
  }

  public ExceptionLimit queryDomainExceptionLimit(String domain, String exceptionName) {
    DomainConfig domainConfig = m_exceptionConfig.getDomainConfigs().get(domain);
    ExceptionLimit result = null;
   
    if (domainConfig == null) {
      domainConfig = m_exceptionConfig.getDomainConfigs().get(DEFAULT_STRING);
    }
    if (domainConfig != null) {
      result = domainConfig.getExceptionLimits().get(exceptionName);
    }
    return result;
  }
View Full Code Here

TOP

Related Classes of com.dianping.cat.home.dependency.exception.entity.DomainConfig

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.