1
2
3
4
5
6
7
8
9
10
11 package psiprobe.model;
12
13 import psiprobe.UtilsBase;
14
15
16
17
18 public class DataSourceInfo {
19
20
21 private String jdbcUrl;
22
23
24 private int busyConnections;
25
26
27 private int establishedConnections;
28
29
30 private int maxConnections;
31
32
33 private boolean resettable;
34
35
36 private String username;
37
38
39 private String type;
40
41
42
43
44
45
46 public String getJdbcUrl() {
47 return jdbcUrl;
48 }
49
50
51
52
53
54
55 public void setJdbcUrl(String jdbcUrl) {
56 this.jdbcUrl = jdbcUrl;
57 }
58
59
60
61
62
63
64 public int getBusyConnections() {
65 return busyConnections;
66 }
67
68
69
70
71
72
73 public void setBusyConnections(int busyConnections) {
74 this.busyConnections = busyConnections;
75 }
76
77
78
79
80
81
82 public int getEstablishedConnections() {
83 return establishedConnections;
84 }
85
86
87
88
89
90
91 public void setEstablishedConnections(int establishedConnections) {
92 this.establishedConnections = establishedConnections;
93 }
94
95
96
97
98
99
100 public int getMaxConnections() {
101 return maxConnections;
102 }
103
104
105
106
107
108
109 public void setMaxConnections(int maxConnections) {
110 this.maxConnections = maxConnections;
111 }
112
113
114
115
116
117
118 public boolean isResettable() {
119 return resettable;
120 }
121
122
123
124
125
126
127 public void setResettable(boolean resettable) {
128 this.resettable = resettable;
129 }
130
131
132
133
134
135
136 public String getUsername() {
137 return username;
138 }
139
140
141
142
143
144
145 public void setUsername(String username) {
146 this.username = username;
147 }
148
149
150
151
152
153
154 public String getType() {
155 return type;
156 }
157
158
159
160
161
162
163 public void setType(String type) {
164 this.type = type;
165 }
166
167
168
169
170
171
172 public int getBusyScore() {
173 return UtilsBase.calcPoolUsageScore(getMaxConnections(), getBusyConnections());
174 }
175
176
177
178
179
180
181 public int getEstablishedScore() {
182 return UtilsBase.calcPoolUsageScore(getMaxConnections(), getEstablishedConnections());
183 }
184
185 }