Package com.dianping.cat.consumer.state.model.entity

Examples of com.dianping.cat.consumer.state.model.entity.ProcessDomain


  protected void visitMachineChildren(Machine to, Machine from) {
    Stack<Object> objs = getObjects();

    for (ProcessDomain source : from.getProcessDomains().values()) {
      ProcessDomain target = to.findProcessDomain(source.getName());

      if (target == null) {
        target = new ProcessDomain(source.getName());
        to.addProcessDomain(target);
      }

      objs.push(target);
      source.accept(this);
View Full Code Here


    String domain = "";
    int index = key.indexOf(':');
    if (index != -1) {
      domain = key.substring(0, index);
      key = key.substring(index + 1);
      ProcessDomain processDomain = show.getProcessDomainMap().get(domain);
      if (processDomain != null) {
        datas = processDomain.getDetails();
      }
    }

    Map<Long, Message> messages = show.getMessagesMap();
    for (int i = 0; i < size; i++) {
View Full Code Here

  public Map<String, ProcessDomain> getProcessDomainMap() {
    return m_processDomains;
  }

  public List<ProcessDomain> getProcessDomains() {
    ProcessDomain domain = m_processDomains.get("PhoenixAgent");

    if (domain != null) {
      domain.getIps().clear();
    }

    List<ProcessDomain> domains = new ArrayList<ProcessDomain>(m_processDomains.values());

    for (ProcessDomain temp : domains) {
View Full Code Here

    }
    return ips.size();
  }

  private ProcessDomain mergeAll(List<ProcessDomain> domains) {
    ProcessDomain all = new ProcessDomain("ALL");

    for (ProcessDomain temp : domains) {
      all.setSize(all.getSize() + temp.getSize());
      all.setTotal(all.getTotal() + temp.getTotal());
      all.setTotalLoss(all.getTotalLoss() + temp.getTotalLoss());
    }

    if (all.getTotal() > 0) {
      all.setAvg(all.getSize() / all.getTotal());
    }
    return all;
  }
View Full Code Here

      Map<String, AtomicLong> sizes = state.getMessageSizes();

      for (Entry<String, AtomicLong> entry : totals.entrySet()) {
        String domain = entry.getKey();
        long value = entry.getValue().get();
        ProcessDomain processDomain = machine.findOrCreateProcessDomain(domain);
        Detail detail = processDomain.findOrCreateDetail(start);

        processDomain.setTotal(value + processDomain.getTotal());
        detail.setTotal(value + detail.getTotal());
      }
      for (Entry<String, AtomicLong> entry : totalLosses.entrySet()) {
        String domain = entry.getKey();
        long value = entry.getValue().get();
        ProcessDomain processDomain = machine.findOrCreateProcessDomain(domain);
        Detail detail = processDomain.findOrCreateDetail(start);

        processDomain.setTotalLoss(value + processDomain.getTotalLoss());
        detail.setTotalLoss(value + detail.getTotalLoss());
      }
      for (Entry<String, AtomicLong> entry : sizes.entrySet()) {
        String domain = entry.getKey();
        long value = entry.getValue().get();
        ProcessDomain processDomain = machine.findOrCreateProcessDomain(domain);
        Detail detail = processDomain.findOrCreateDetail(start);

        processDomain.setSize(value + processDomain.getSize());
        detail.setSize(value + detail.getSize());
      }

      long messageTotal = state.getMessageTotal();
      long messageTotalLoss = state.getMessageTotalLoss();
View Full Code Here

    Machine machine = buildStateInfo(report.findOrCreateMachine(m_ip));
    StateReport stateReport = m_reportManager.getHourlyReport(getStartTime(), Constants.CAT, true);
    Map<String, ProcessDomain> processDomains = stateReport.findOrCreateMachine(m_ip).getProcessDomains();

    for (Map.Entry<String, ProcessDomain> entry : machine.getProcessDomains().entrySet()) {
      ProcessDomain processDomain = processDomains.get(entry.getKey());

      if (processDomain != null) {
        entry.getValue().getIps().addAll(processDomain.getIps());
      }
    }
    return report;
  }
View Full Code Here

TOP

Related Classes of com.dianping.cat.consumer.state.model.entity.ProcessDomain

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.