Package com.dianping.cat.advanced.metric.config.entity

Examples of com.dianping.cat.advanced.metric.config.entity.MetricConfig


      }
    } catch (Exception e) {
      Cat.logError(e);
    }
    if (m_metricConfig == null) {
      m_metricConfig = new MetricConfig();
    }

    deleteUnusedConfig();
  }
View Full Code Here


    long modifyTime = config.getModifyDate().getTime();

    synchronized (this) {
      if (modifyTime > m_modifyTime) {
        String content = config.getContent();
        MetricConfig metricConfig = DefaultSaxParser.parse(content);

        m_metricConfig = metricConfig;
        m_modifyTime = modifyTime;
      }
    }
View Full Code Here

    ((MockMetricConfigManager) manager).setConfigDao(new MockConfigDao2());
    try {
      manager.initialize();
    } catch (Exception e) {
    }
    MetricConfig config = manager.getMetricConfig();
    Assert.assertEquals(0, config.getMetricItemConfigs().size());
  }
View Full Code Here

    @Override
    public Config findByPK(int keyId, Readset<Config> readset) throws DalException {
      Config config = new Config();

      config.setId(keyId);
      config.setContent(new MetricConfig().toString());
      config.setModifyDate(new Date());
      return config;
    }
View Full Code Here

    @Override
    public Config findByName(String name, Readset<Config> readset) throws DalException {
      Config config = new Config();

      config.setName(name);
      MetricConfig metricConfig = new MetricConfig();

      MetricItemConfig metricItemConfig = new MetricItemConfig();

      metricItemConfig.setDomain("domain");
      metricItemConfig.setMetricKey("domain:URL:metricKey");
      metricItemConfig.setType("URL");
      metricItemConfig.setMetricKey("metricKey");
      metricConfig.addMetricItemConfig(metricItemConfig);
      config.setContent(metricConfig.toString());
      config.setModifyDate(new Date());
      return config;
    }
View Full Code Here

TOP

Related Classes of com.dianping.cat.advanced.metric.config.entity.MetricConfig

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.