1 /* 2 * Copyright (c) 2021 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 package ohos.devtools.views.trace.metrics.bean; 17 18 import ohos.devtools.views.trace.DField; 19 20 import java.util.Objects; 21 22 /** 23 * Distribute Term entity 24 * 25 * @since 2021/9/10 26 */ 27 public class DistributeTerm { 28 @DField(name = "threadId") 29 private String threadId; 30 31 @DField(name = "threadName") 32 private String threadName; 33 34 @DField(name = "processId") 35 private String processId; 36 37 @DField(name = "process_name") 38 private String processName; 39 40 @DField(name = "funName") 41 private String funName; 42 43 @DField(name = "dur") 44 private String dur; 45 46 @DField(name = "ts") 47 private String time; 48 49 @DField(name = "chainId") 50 private String chainId; 51 52 @DField(name = "spanId") 53 private int spanId; 54 55 @DField(name = "parentSpanId") 56 private int parentSpanId; 57 58 @DField(name = "flag") 59 private String flag; 60 61 @DField(name = "trace_name") 62 private String traceName; 63 getThreadName()64 public String getThreadName() { 65 return threadName; 66 } 67 setThreadName(String threadName)68 public void setThreadName(String threadName) { 69 this.threadName = threadName; 70 } 71 getProcessName()72 public String getProcessName() { 73 return processName; 74 } 75 setProcessName(String processName)76 public void setProcessName(String processName) { 77 this.processName = processName; 78 } 79 getFunName()80 public String getFunName() { 81 return funName; 82 } 83 setFunName(String funName)84 public void setFunName(String funName) { 85 this.funName = funName; 86 } 87 getDur()88 public String getDur() { 89 return dur; 90 } 91 setDur(String dur)92 public void setDur(String dur) { 93 this.dur = dur; 94 } 95 getTime()96 public String getTime() { 97 return time; 98 } 99 setTime(String time)100 public void setTime(String time) { 101 this.time = time; 102 } 103 getChainId()104 public String getChainId() { 105 return chainId; 106 } 107 setChainId(String chainId)108 public void setChainId(String chainId) { 109 this.chainId = chainId; 110 } 111 getSpanId()112 public int getSpanId() { 113 return spanId; 114 } 115 setSpanId(int spanId)116 public void setSpanId(int spanId) { 117 this.spanId = spanId; 118 } 119 getParentSpanId()120 public int getParentSpanId() { 121 return parentSpanId; 122 } 123 setParentSpanId(int parentSpanId)124 public void setParentSpanId(int parentSpanId) { 125 this.parentSpanId = parentSpanId; 126 } 127 getFlag()128 public String getFlag() { 129 return flag; 130 } 131 setFlag(String flag)132 public void setFlag(String flag) { 133 this.flag = flag; 134 } 135 getTraceName()136 public String getTraceName() { 137 return traceName; 138 } 139 setTraceName(String traceName)140 public void setTraceName(String traceName) { 141 this.traceName = traceName; 142 } 143 getThreadId()144 public String getThreadId() { 145 return threadId; 146 } 147 setThreadId(String threadId)148 public void setThreadId(String threadId) { 149 this.threadId = threadId; 150 } 151 getProcessId()152 public String getProcessId() { 153 return processId; 154 } 155 setProcessId(String processId)156 public void setProcessId(String processId) { 157 this.processId = processId; 158 } 159 160 @Override equals(Object obj)161 public boolean equals(Object obj) { 162 if (this == obj) { 163 return true; 164 } 165 if (obj == null || getClass() != obj.getClass()) { 166 return false; 167 } 168 DistributeTerm that = (DistributeTerm) obj; 169 return spanId == that.spanId && parentSpanId == that.parentSpanId && Objects.equals(threadId, that.threadId) 170 && Objects.equals(threadName, that.threadName) && Objects.equals(processId, that.processId) && Objects 171 .equals(processName, that.processName) && Objects.equals(funName, that.funName) && Objects 172 .equals(dur, that.dur) && Objects.equals(time, that.time) && Objects.equals(chainId, that.chainId) 173 && Objects.equals(flag, that.flag) && Objects.equals(traceName, that.traceName); 174 } 175 176 @Override hashCode()177 public int hashCode() { 178 return Objects 179 .hash(threadId, threadName, processId, processName, funName, dur, time, chainId, spanId, parentSpanId, flag, 180 traceName); 181 } 182 183 @Override toString()184 public String toString() { 185 return "DistributeTerm{" + "threadId='" + threadId + '\'' + ", threadName='" + threadName + '\'' 186 + ", processId='" + processId + '\'' + ", processName='" + processName + '\'' + ", funName='" + funName 187 + '\'' + ", dur=" + dur + ", time=" + time + ", chainId='" + chainId + '\'' + ", spanId=" + spanId 188 + ", parentSpanId=" + parentSpanId + ", flag='" + flag + '\'' + ", traceName='" + traceName + '\'' + '}'; 189 } 190 } 191