• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.services.memory.agentbean;
17 
18 import java.io.Serializable;
19 
20 /**
21  * specific instance information
22  *
23  * @since 2021/5/19 16:39
24  */
25 public class MemoryInstanceInfo implements Serializable {
26     private static final long serialVersionUID = -2702142952950557386L;
27 
28     /**
29      * id Of The Current Instance Object
30      */
31     private Integer id;
32 
33     /**
34      * instanceId Obtained FromT he EndSide
35      */
36     private Integer instanceId;
37 
38     /**
39      * Class Id corresponding to the current instance Instance
40      */
41     private Integer cId;
42 
43     /**
44      * instance Name
45      */
46     private String instance;
47 
48     /**
49      * creation time of the current instance
50      */
51     private Long allocTime;
52 
53     /**
54      * Destruction Time Of The CurrentInstance
55      */
56     private Long deallocTime;
57 
58     /**
59      * Storage Time Of The CurrentInstance
60      */
61     private Long createTime;
62 
63     /**
64      * get Id
65      *
66      * @return id
67      */
getId()68     public Integer getId() {
69         return id;
70     }
71 
72     /**
73      * setId
74      *
75      * @param id id
76      */
setId(Integer id)77     public void setId(Integer id) {
78         this.id = id;
79     }
80 
81     /**
82      * getInstance Id
83      *
84      * @return instanceId
85      */
getInstanceId()86     public Integer getInstanceId() {
87         return instanceId;
88     }
89 
90     /**
91      * set InstanceId
92      *
93      * @param instanceId instanceId
94      */
setInstanceId(Integer instanceId)95     public void setInstanceId(Integer instanceId) {
96         this.instanceId = instanceId;
97     }
98 
99     /**
100      * get class Id
101      *
102      * @return Integer
103      */
getcId()104     public Integer getcId() {
105         return cId;
106     }
107 
108     /**
109      * set class Id
110      *
111      * @param cId cId
112      */
setcId(Integer cId)113     public void setcId(Integer cId) {
114         this.cId = cId;
115     }
116 
117     /**
118      * get Instance
119      *
120      * @return instance
121      */
getInstance()122     public String getInstance() {
123         return instance;
124     }
125 
126     /**
127      * setInstance
128      *
129      * @param instance instance
130      */
setInstance(String instance)131     public void setInstance(String instance) {
132         this.instance = instance;
133     }
134 
135     /**
136      * getAllocTime
137      *
138      * @return allocTime
139      */
getAllocTime()140     public Long getAllocTime() {
141         return allocTime;
142     }
143 
144     /**
145      * setAllocTime
146      *
147      * @param allocTime allocTime
148      */
setAllocTime(Long allocTime)149     public void setAllocTime(Long allocTime) {
150         this.allocTime = allocTime;
151     }
152 
153     /**
154      * getDeallocTime
155      *
156      * @return deallocTime
157      */
getDeallocTime()158     public Long getDeallocTime() {
159         return deallocTime;
160     }
161 
162     /**
163      * setDeallocTime
164      *
165      * @param deallocTime deallocTime
166      */
setDeallocTime(Long deallocTime)167     public void setDeallocTime(Long deallocTime) {
168         this.deallocTime = deallocTime;
169     }
170 
171     /**
172      * getCreateTime
173      *
174      * @return createTime
175      */
getCreateTime()176     public Long getCreateTime() {
177         return createTime;
178     }
179 
180     /**
181      * setCreateTime
182      *
183      * @param createTime createTime
184      */
setCreateTime(Long createTime)185     public void setCreateTime(Long createTime) {
186         this.createTime = createTime;
187     }
188 
189     @Override
toString()190     public String toString() {
191         return "MemoryInstanceInfo{" + "id=" + id + ", instanceId=" + instanceId + ", cId=" + cId + ", instance='"
192             + instance + '\'' + ", allocTime=" + allocTime + ", deallocTime=" + deallocTime + ", createTime="
193             + createTime + '}';
194     }
195 }
196