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

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


      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();
      long messageSize = state.getMessageSize();
View Full Code Here


    for (int i = 0; i < size; i++) {
      if (index != -1) {
        if (datas == null) {
          continue;
        }
        Detail detail = datas.get(i * 60 * 1000L + start);
        if (detail == null) {
          continue;
        }
        if (key.equalsIgnoreCase("total")) {
          result[i] = detail.getTotal();
        } else if (key.equalsIgnoreCase("totalLoss")) {
          result[i] = detail.getTotalLoss();
        } else if (key.equalsIgnoreCase("size")) {
          result[i] = detail.getSize() / 1024 / 1024;
        }
        continue;
      }
      Message message = messages.get(i * 60 * 1000L + start);

View Full Code Here

  @Override
  public void visitDetail(Detail detail) {
    Map<Long, Detail> details = m_processDomain.getDetails();
    Long id = detail.getId();
    Detail temp = details.get(id);
    if (temp == null) {
      details.put(id, detail);
    } else {
      temp.setSize(temp.getSize() + detail.getSize());
      temp.setTotal(temp.getTotal() + detail.getTotal());
      temp.setTotalLoss(temp.getTotalLoss() + detail.getTotalLoss());
    }
  }
View Full Code Here

TOP

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

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.