Package org.yaac.client.ui.StatisticsView

Examples of org.yaac.client.ui.StatisticsView.NamespaceBreakdown


        // shouldn't use Strings.isNullOrEmpty as there is an empty namespace
        if (selectedNamespace != null && !namespace.equals(selectedNamespace)) {
          continue;
        }
       
        NamespaceBreakdown namespaceBreakdown = namespaceBreakdownMap.get(namespace);
        if (namespaceBreakdown == null) {
          namespaceBreakdown = new NamespaceBreakdown(namespace);
          namespaceBreakdownMap.put(namespace, namespaceBreakdown);
        }
       
        for (KindWrapper kindWrapper : stat.getNsKindsMap().get(namespace)) {         
          String kindName = kindWrapper.getKind().getKind_name();
         
          // filter out kind
          if (!isNullOrEmpty(selectedKind) && !selectedKind.equals(kindName)) {
            continue;
          }
         
          KindBreakdown kindBreakdown = kindBreakdownMap.get(kindName);
          if (kindBreakdown == null) {
            kindBreakdown = new KindBreakdown(kindName);
            kindBreakdownMap.put(kindName, kindBreakdown);
          }
          kindBreakdown.addCount(kindWrapper.getKind().getCount());
          kindBreakdown.addSize(kindWrapper.getKind().getBytes());
          kindBreakdown.addRootCount(
              kindWrapper.getRootKind() == null ? 0l : kindWrapper.getRootKind().getCount());
          kindBreakdown.addRootSize(
              kindWrapper.getRootKind() == null ? 0l : kindWrapper.getRootKind().getBytes());
          kindBreakdown.addNonRootCount(
              kindWrapper.getNonRootKind() == null ? 0l : kindWrapper.getNonRootKind().getCount());
          kindBreakdown.addNonRootSize(
              kindWrapper.getNonRootKind() == null ? 0l : kindWrapper.getNonRootKind().getBytes());
         
          // all aggregate to the same namespace
          namespaceBreakdown.addBytes(kindWrapper.getKind().getBytes());
          namespaceBreakdown.addCount(kindWrapper.getKind().getCount());
        }
      }
     
      view.updateNamespaceBreakdown(new ArrayList<NamespaceBreakdown>(namespaceBreakdownMap.values()));
      view.updateKindBreakdown(new ArrayList<KindBreakdown>(kindBreakdownMap.values()));
View Full Code Here

TOP

Related Classes of org.yaac.client.ui.StatisticsView.NamespaceBreakdown

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.