fixing warnings from checkstyle in common-app-api
[sdc.git] / common-app-api / src / main / java / org / openecomp / sdc / common / monitoring / MonitoringEvent.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * SDC
4  * ================================================================================
5  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END=========================================================
19  */
20
21 package org.openecomp.sdc.common.monitoring;
22
23 import org.openecomp.sdc.common.datastructure.ESTimeBasedEvent;
24
25 public class MonitoringEvent extends ESTimeBasedEvent {
26
27     private static final String MONITORING_EVENT_TEMPLATE = "hostid=\"%s\" hostcpu=\"%s\" hostmem=\"%s\" hostdisk=\"%s\" " + "jvmid=\"%s\" jvmcpu=\"%s\" jvmmem=\"%s\" jvmtnum=\"%s\" " + "appid=\"%s\" appstat=\"%s\"";
28
29     private String hostid;
30     private Long hostcpu;
31     private Double hostmem;
32     private String hostdisk;
33     private String jvmid;
34     private Long jvmcpu;
35     private Long jvmmem;
36     private Integer jvmtnum;
37     private String appid;
38     private String appstat;
39
40     public String getHostid() {
41         return hostid;
42     }
43
44     public void setHostid(String hostid) {
45         this.hostid = hostid;
46     }
47
48     public Long getHostcpu() {
49         return hostcpu;
50     }
51
52     public void setHostcpu(Long hostcpu) {
53         this.hostcpu = hostcpu;
54     }
55
56     public Double getHostmem() {
57         return hostmem;
58     }
59
60     public void setHostmem(Double hostmem) {
61         this.hostmem = hostmem;
62     }
63
64     public String getHostdisk() {
65         return hostdisk;
66     }
67
68     public void setHostdisk(String hostdisk) {
69         this.hostdisk = hostdisk;
70     }
71
72     public String getJvmid() {
73         return jvmid;
74     }
75
76     public void setJvmid(String jvmid) {
77         this.jvmid = jvmid;
78     }
79
80     public Long getJvmcpu() {
81         return jvmcpu;
82     }
83
84     public void setJvmcpu(Long jvmcpu) {
85         this.jvmcpu = jvmcpu;
86     }
87
88     public Long getJvmmem() {
89         return jvmmem;
90     }
91
92     public void setJvmmem(Long jvmmem) {
93         this.jvmmem = jvmmem;
94     }
95
96     public Integer getJvmtnum() {
97         return jvmtnum;
98     }
99
100     public void setJvmtnum(Integer jvmtnum) {
101         this.jvmtnum = jvmtnum;
102     }
103
104     public String getAppid() {
105         return appid;
106     }
107
108     public void setAppid(String appid) {
109         this.appid = appid;
110     }
111
112     public String getAppstat() {
113         return appstat;
114     }
115
116     public void setAppstat(String appstat) {
117         this.appstat = appstat;
118     }
119
120     @Override
121     public String toString() {
122         return getFormattedString(MONITORING_EVENT_TEMPLATE, hostid, hostcpu, hostmem, hostdisk, jvmid, jvmcpu, jvmmem, jvmtnum, appid, appstat);
123     }
124 }