1
1
/**
2
- * Copyright 2009-2017 the original author or authors.
2
+ * Copyright 2009-2018 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -41,7 +41,7 @@ class PooledConnection implements InvocationHandler {
41
41
private int connectionTypeCode ;
42
42
private boolean valid ;
43
43
44
- /*
44
+ /**
45
45
* Constructor for SimplePooledConnection that uses the Connection and PooledDataSource passed in
46
46
*
47
47
* @param connection - the connection that is to be presented as a pooled connection
@@ -57,14 +57,14 @@ public PooledConnection(Connection connection, PooledDataSource dataSource) {
57
57
this .proxyConnection = (Connection ) Proxy .newProxyInstance (Connection .class .getClassLoader (), IFACES , this );
58
58
}
59
59
60
- /*
60
+ /**
61
61
* Invalidates the connection
62
62
*/
63
63
public void invalidate () {
64
64
valid = false ;
65
65
}
66
66
67
- /*
67
+ /**
68
68
* Method to see if the connection is usable
69
69
*
70
70
* @return True if the connection is usable
@@ -73,7 +73,7 @@ public boolean isValid() {
73
73
return valid && realConnection != null && dataSource .pingConnection (this );
74
74
}
75
75
76
- /*
76
+ /**
77
77
* Getter for the *real* connection that this wraps
78
78
*
79
79
* @return The connection
@@ -82,7 +82,7 @@ public Connection getRealConnection() {
82
82
return realConnection ;
83
83
}
84
84
85
- /*
85
+ /**
86
86
* Getter for the proxy for the connection
87
87
*
88
88
* @return The proxy
@@ -91,7 +91,7 @@ public Connection getProxyConnection() {
91
91
return proxyConnection ;
92
92
}
93
93
94
- /*
94
+ /**
95
95
* Gets the hashcode of the real connection (or 0 if it is null)
96
96
*
97
97
* @return The hashcode of the real connection (or 0 if it is null)
@@ -100,7 +100,7 @@ public int getRealHashCode() {
100
100
return realConnection == null ? 0 : realConnection .hashCode ();
101
101
}
102
102
103
- /*
103
+ /**
104
104
* Getter for the connection type (based on url + user + password)
105
105
*
106
106
* @return The connection type
@@ -109,7 +109,7 @@ public int getConnectionTypeCode() {
109
109
return connectionTypeCode ;
110
110
}
111
111
112
- /*
112
+ /**
113
113
* Setter for the connection type
114
114
*
115
115
* @param connectionTypeCode - the connection type
@@ -118,7 +118,7 @@ public void setConnectionTypeCode(int connectionTypeCode) {
118
118
this .connectionTypeCode = connectionTypeCode ;
119
119
}
120
120
121
- /*
121
+ /**
122
122
* Getter for the time that the connection was created
123
123
*
124
124
* @return The creation timestamp
@@ -127,7 +127,7 @@ public long getCreatedTimestamp() {
127
127
return createdTimestamp ;
128
128
}
129
129
130
- /*
130
+ /**
131
131
* Setter for the time that the connection was created
132
132
*
133
133
* @param createdTimestamp - the timestamp
@@ -136,7 +136,7 @@ public void setCreatedTimestamp(long createdTimestamp) {
136
136
this .createdTimestamp = createdTimestamp ;
137
137
}
138
138
139
- /*
139
+ /**
140
140
* Getter for the time that the connection was last used
141
141
*
142
142
* @return - the timestamp
@@ -145,7 +145,7 @@ public long getLastUsedTimestamp() {
145
145
return lastUsedTimestamp ;
146
146
}
147
147
148
- /*
148
+ /**
149
149
* Setter for the time that the connection was last used
150
150
*
151
151
* @param lastUsedTimestamp - the timestamp
@@ -154,7 +154,7 @@ public void setLastUsedTimestamp(long lastUsedTimestamp) {
154
154
this .lastUsedTimestamp = lastUsedTimestamp ;
155
155
}
156
156
157
- /*
157
+ /**
158
158
* Getter for the time since this connection was last used
159
159
*
160
160
* @return - the time since the last use
@@ -163,7 +163,7 @@ public long getTimeElapsedSinceLastUse() {
163
163
return System .currentTimeMillis () - lastUsedTimestamp ;
164
164
}
165
165
166
- /*
166
+ /**
167
167
* Getter for the age of the connection
168
168
*
169
169
* @return the age
@@ -172,7 +172,7 @@ public long getAge() {
172
172
return System .currentTimeMillis () - createdTimestamp ;
173
173
}
174
174
175
- /*
175
+ /**
176
176
* Getter for the timestamp that this connection was checked out
177
177
*
178
178
* @return the timestamp
@@ -181,7 +181,7 @@ public long getCheckoutTimestamp() {
181
181
return checkoutTimestamp ;
182
182
}
183
183
184
- /*
184
+ /**
185
185
* Setter for the timestamp that this connection was checked out
186
186
*
187
187
* @param timestamp the timestamp
@@ -190,7 +190,7 @@ public void setCheckoutTimestamp(long timestamp) {
190
190
this .checkoutTimestamp = timestamp ;
191
191
}
192
192
193
- /*
193
+ /**
194
194
* Getter for the time that this connection has been checked out
195
195
*
196
196
* @return the time
@@ -204,7 +204,7 @@ public int hashCode() {
204
204
return hashCode ;
205
205
}
206
206
207
- /*
207
+ /**
208
208
* Allows comparing this connection to another
209
209
*
210
210
* @param obj - the other connection to test for equality
@@ -221,7 +221,7 @@ public boolean equals(Object obj) {
221
221
}
222
222
}
223
223
224
- /*
224
+ /**
225
225
* Required for InvocationHandler implementation.
226
226
*
227
227
* @param proxy - not used
0 commit comments