Commit 5668b263b532baaccc8edf54e96f829839413909
Added toString changes from Luis Costa
| |   |
| 36 | 36 | public void setPhysical(long physical) { |
| 37 | 37 | this.physical = physical; |
| 38 | 38 | } |
|
| @Override |
| public String toString() { |
| return String.format("capacity:%d%nallocation:%d%nphysical:%d%n", capacity, allocation, physical); |
| } |
| 39 | 44 | } |
| |   |
| 78 | 78 | state = DomainState.values()[info.state]; |
| 79 | 79 | } |
| 80 | 80 | |
| @Override |
| 81 | 82 | public String toString() { |
| StringBuffer result = new StringBuffer(""); |
| result.append("state:" + state + "\n"); |
| result.append("maxMem:" + maxMem + "\n"); |
| result.append("memory:" + memory + "\n"); |
| result.append("nrVirtCpu:" + nrVirtCpu + "\n"); |
| result.append("cpuTime:" + cpuTime + "\n"); |
| return result.toString(); |
| return String.format("state:%s%nmaxMem:%d%nmemory:%d%nnrVirtCpu:%d%ncpuTime:%d%n", state, maxMem, memory, nrVirtCpu, cpuTime); |
| 89 | 84 | } |
| 90 | 85 | } |
| |   |
| 32 | 32 | tx_errs = vStats.tx_errs; |
| 33 | 33 | tx_drop = vStats.tx_drop; |
| 34 | 34 | } |
|
| @Override |
| public String toString() { |
| 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); |
| } |
|
| 35 | 41 | } |
| |   |
| 126 | 126 | public void setType(int type) { |
| 127 | 127 | this.type = type; |
| 128 | 128 | } |
|
| @Override |
| public String toString() { |
| 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); |
| } |
| 129 | 134 | } |
| |   |
| 305 | 305 | |
| 306 | 306 | @Override |
| 307 | 307 | public String toString() { |
| StringBuffer output = new StringBuffer(); |
| output.append("level:" + level + "\n"); |
| output.append("code:" + code + "\n"); |
| output.append("domain:" + domain + "\n"); |
| output.append("hasConn:" + hasConn() + "\n"); |
| output.append("hasDom:" + hasDom() + "\n"); |
| output.append("hasNet:" + hasNet() + "\n"); |
| output.append("message:" + message + "\n"); |
| output.append("str1:" + str1 + "\n"); |
| output.append("str2:" + str2 + "\n"); |
| output.append("str3:" + str3 + "\n"); |
| output.append("int1:" + int1 + "\n"); |
| output.append("int2:" + int2 + "\n"); |
| return output.toString(); |
|
| 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); |
| 323 | 309 | } |
| 324 | 310 | } |
| |   |
| 27 | 27 | public void setValue(long val) { |
| 28 | 28 | this.val = val; |
| 29 | 29 | } |
|
| @Override |
| public String toString() { |
| return String.format("tag:%d%nval:%d%n", tag, val); |
| } |
| 30 | 35 | } |
| |   |
| 62 | 62 | public int maxCpus() { |
| 63 | 63 | return nodes * sockets * cores * threads; |
| 64 | 64 | } |
|
| @Override |
| public String toString() { |
| 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); |
| } |
| 65 | 70 | } |
| |   |
| 82 | 82 | this(vInfo.state, vInfo.capacity, vInfo.allocation, vInfo.available); |
| 83 | 83 | } |
| 84 | 84 | |
| @Override |
| 85 | 86 | public String toString() { |
| StringBuffer result = new StringBuffer(""); |
| result.append("state:" + state + "\n"); |
| result.append("capacity:" + capacity + "\n"); |
| result.append("allocation:" + allocation + "\n"); |
| result.append("available:" + available + "\n"); |
| return result.toString(); |
| return String.format("state:%s%ncapacity:%d%nallocation:%d%navailable:%d%n", state, capacity, allocation, available); |
| 92 | 88 | } |
| 93 | 89 | } |
| |   |
| 60 | 60 | this(volInfo.type, volInfo.capacity, volInfo.allocation); |
| 61 | 61 | } |
| 62 | 62 | |
| @Override |
| 63 | 64 | public String toString() { |
| StringBuffer result = new StringBuffer(""); |
| result.append("type:" + type + "\n"); |
| result.append("capacity:" + capacity + "\n"); |
| result.append("allocation:" + allocation + "\n"); |
| return result.toString(); |
| return String.format("type:%s%ncapacity:%d%nallocation:%d%n", type, capacity, allocation); |
| 69 | 66 | } |
| 70 | 67 | } |
| |   |
| 26 | 26 | cpu = vVcpu.cpu; |
| 27 | 27 | state = VcpuState.values()[vVcpu.state]; |
| 28 | 28 | } |
|
| @Override |
| public String toString() { |
| return String.format("number:%d%ncpuTime:%d%ncpu:%d%nstate:%s%n", number, cpuTime, cpu, state); |
| } |
| 29 | 34 | } |