Commit 5668b263b532baaccc8edf54e96f829839413909

  • avatar
  • Bryan Kearney <bkearney @red…at.com>
  • Thu Jun 24 14:17:12 CEST 2010
Added toString changes from Luis Costa
  
3636 public void setPhysical(long physical) {
3737 this.physical = physical;
3838 }
39
40 @Override
41 public String toString() {
42 return String.format("capacity:%d%nallocation:%d%nphysical:%d%n", capacity, allocation, physical);
43 }
3944}
  
7878 state = DomainState.values()[info.state];
7979 }
8080
81 @Override
8182 public String toString() {
82 StringBuffer result = new StringBuffer("");
83 result.append("state:" + state + "\n");
84 result.append("maxMem:" + maxMem + "\n");
85 result.append("memory:" + memory + "\n");
86 result.append("nrVirtCpu:" + nrVirtCpu + "\n");
87 result.append("cpuTime:" + cpuTime + "\n");
88 return result.toString();
83 return String.format("state:%s%nmaxMem:%d%nmemory:%d%nnrVirtCpu:%d%ncpuTime:%d%n", state, maxMem, memory, nrVirtCpu, cpuTime);
8984 }
9085}
  
3232 tx_errs = vStats.tx_errs;
3333 tx_drop = vStats.tx_drop;
3434 }
35
36 @Override
37 public String toString() {
38 return String.format("rx_bytes:%d%nrx_packets:%d%nrx_errs:%d%nrx_drop:%d%ntx_bytes:%d%ntx_packets:%d%ntx_errs:%d%ntx_drop:%d%n", rx_bytes, rx_packets, rx_errs, rx_drop, tx_bytes, tx_packets, tx_errs, tx_drop);
39 }
40
3541}
  
126126 public void setType(int type) {
127127 this.type = type;
128128 }
129
130 @Override
131 public String toString() {
132 return String.format("type:%d%ntimeElapsed:%d%ntimeRemaining:%d%ndataTotal:%d%ndataProcessed:%d%ndataRemaining:%d%nmemTotal:%d%nmemProcessed:%d%nmemRemaining:%d%nfileTotal:%d%nfileProcessed:%d%nfileRemaining:%d%n", type, timeElapsed, timeRemaining, dataTotal, dataProcessed, dataRemaining, memTotal, memProcessed, memRemaining, fileTotal, fileProcessed, fileRemaining);
133 }
129134}
  
305305
306306 @Override
307307 public String toString() {
308 StringBuffer output = new StringBuffer();
309 output.append("level:" + level + "\n");
310 output.append("code:" + code + "\n");
311 output.append("domain:" + domain + "\n");
312 output.append("hasConn:" + hasConn() + "\n");
313 output.append("hasDom:" + hasDom() + "\n");
314 output.append("hasNet:" + hasNet() + "\n");
315 output.append("message:" + message + "\n");
316 output.append("str1:" + str1 + "\n");
317 output.append("str2:" + str2 + "\n");
318 output.append("str3:" + str3 + "\n");
319 output.append("int1:" + int1 + "\n");
320 output.append("int2:" + int2 + "\n");
321 return output.toString();
322
308 return String.format("level:%s%ncode:%s%ndomain:%s%nhasConn:%b%nhasDom:%b%nhasNet:%b%nmessage:%s%nstr1:%s%nstr2:%s%nstr3:%s%nint1:%d%nint2:%d%n", level, code, domain, hasConn(), hasDom(), hasNet(), message, str1, str2, str3, int1, int2);
323309 }
324310}
  
2727 public void setValue(long val) {
2828 this.val = val;
2929 }
30
31 @Override
32 public String toString() {
33 return String.format("tag:%d%nval:%d%n", tag, val);
34 }
3035}
  
6262 public int maxCpus() {
6363 return nodes * sockets * cores * threads;
6464 }
65
66 @Override
67 public String toString() {
68 return String.format("model:%s%nmemory:%d%ncpus:%d%nmhz:%d%nnodes:%d%nsockets:%d%ncores:%d%nthreads:%d%n", model, memory, cpus, mhz, nodes, sockets, cores, threads);
69 }
6570}
  
8282 this(vInfo.state, vInfo.capacity, vInfo.allocation, vInfo.available);
8383 }
8484
85 @Override
8586 public String toString() {
86 StringBuffer result = new StringBuffer("");
87 result.append("state:" + state + "\n");
88 result.append("capacity:" + capacity + "\n");
89 result.append("allocation:" + allocation + "\n");
90 result.append("available:" + available + "\n");
91 return result.toString();
87 return String.format("state:%s%ncapacity:%d%nallocation:%d%navailable:%d%n", state, capacity, allocation, available);
9288 }
9389}
  
6060 this(volInfo.type, volInfo.capacity, volInfo.allocation);
6161 }
6262
63 @Override
6364 public String toString() {
64 StringBuffer result = new StringBuffer("");
65 result.append("type:" + type + "\n");
66 result.append("capacity:" + capacity + "\n");
67 result.append("allocation:" + allocation + "\n");
68 return result.toString();
65 return String.format("type:%s%ncapacity:%d%nallocation:%d%n", type, capacity, allocation);
6966 }
7067}
  
2626 cpu = vVcpu.cpu;
2727 state = VcpuState.values()[vVcpu.state];
2828 }
29
30 @Override
31 public String toString() {
32 return String.format("number:%d%ncpuTime:%d%ncpu:%d%nstate:%s%n", number, cpuTime, cpu, state);
33 }
2934}