Package org.cloudfoundry.client.lib.domain.InstanceStats

Examples of org.cloudfoundry.client.lib.domain.InstanceStats.Usage


  public String getColumnText(Object element, int columnIndex) {
    if (element instanceof InstanceStatsAndInfo) {
      InstanceStatsAndInfo statsAndInfo = (InstanceStatsAndInfo) element;
      InstanceStats stats = statsAndInfo.getStats();

      Usage usage = stats.getUsage();
      double cpu = 0.0;
      String memory = "0M"; //$NON-NLS-1$
      String disk = "0M"; //$NON-NLS-1$
      if (usage != null) {
        cpu = usage.getCpu();
        memory = getFormattedMemory(usage.getMem() / 1024);
        disk = getFormattedMemory(usage.getDisk() / 1024);
      }
      switch (columnIndex) {
      case 0:
        return stats.getId();
      case 1:
View Full Code Here

TOP

Related Classes of org.cloudfoundry.client.lib.domain.InstanceStats.Usage

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.