@@ -71,9 +71,6 @@ public final class MySqlConnectionConfiguration {
71
71
@ Nullable
72
72
private final Duration connectTimeout ;
73
73
74
- @ Nullable
75
- private final Duration socketTimeout ;
76
-
77
74
@ Nullable
78
75
private final ZoneId serverZoneId ;
79
76
@@ -108,7 +105,7 @@ public final class MySqlConnectionConfiguration {
108
105
private MySqlConnectionConfiguration (
109
106
boolean isHost , String domain , int port , MySqlSslConfiguration ssl ,
110
107
boolean tcpKeepAlive , boolean tcpNoDelay , @ Nullable Duration connectTimeout ,
111
- @ Nullable Duration socketTimeout , ZeroDateOption zeroDateOption , @ Nullable ZoneId serverZoneId ,
108
+ ZeroDateOption zeroDateOption , @ Nullable ZoneId serverZoneId ,
112
109
String user , @ Nullable CharSequence password , @ Nullable String database ,
113
110
boolean createDatabaseIfNotExist , @ Nullable Predicate <String > preferPrepareStatement ,
114
111
@ Nullable Path loadLocalInfilePath , int localInfileBufferSize ,
@@ -121,7 +118,6 @@ private MySqlConnectionConfiguration(
121
118
this .tcpKeepAlive = tcpKeepAlive ;
122
119
this .tcpNoDelay = tcpNoDelay ;
123
120
this .connectTimeout = connectTimeout ;
124
- this .socketTimeout = socketTimeout ;
125
121
this .ssl = ssl ;
126
122
this .serverZoneId = serverZoneId ;
127
123
this .zeroDateOption = requireNonNull (zeroDateOption , "zeroDateOption must not be null" );
@@ -164,16 +160,6 @@ Duration getConnectTimeout() {
164
160
return connectTimeout ;
165
161
}
166
162
167
- /**
168
- * @deprecated This option has been deprecated as of version 1.0.1, because it has no effect and serves no purpose.
169
- * Please remove any references to this option from your code, as it will be removed in a future release.
170
- */
171
- @ Nullable
172
- @ Deprecated
173
- Duration getSocketTimeout () {
174
- return socketTimeout ;
175
- }
176
-
177
163
MySqlSslConfiguration getSsl () {
178
164
return ssl ;
179
165
}
@@ -259,7 +245,6 @@ public boolean equals(Object o) {
259
245
tcpKeepAlive == that .tcpKeepAlive &&
260
246
tcpNoDelay == that .tcpNoDelay &&
261
247
Objects .equals (connectTimeout , that .connectTimeout ) &&
262
- Objects .equals (socketTimeout , that .socketTimeout ) &&
263
248
Objects .equals (serverZoneId , that .serverZoneId ) &&
264
249
zeroDateOption == that .zeroDateOption &&
265
250
user .equals (that .user ) &&
@@ -278,7 +263,7 @@ public boolean equals(Object o) {
278
263
@ Override
279
264
public int hashCode () {
280
265
return Objects .hash (isHost , domain , port , ssl , tcpKeepAlive , tcpNoDelay , connectTimeout ,
281
- socketTimeout , serverZoneId , zeroDateOption , user , password , database , createDatabaseIfNotExist ,
266
+ serverZoneId , zeroDateOption , user , password , database , createDatabaseIfNotExist ,
282
267
preferPrepareStatement , loadLocalInfilePath , localInfileBufferSize , queryCacheSize ,
283
268
prepareCacheSize , extensions , passwordPublisher );
284
269
}
@@ -287,8 +272,8 @@ public int hashCode() {
287
272
public String toString () {
288
273
if (isHost ) {
289
274
return "MySqlConnectionConfiguration{host='" + domain + "', port=" + port + ", ssl=" + ssl +
290
- ", tcpNoDelay=" + tcpNoDelay + ", tcpKeepAlive=" + tcpKeepAlive + ", connectTimeout=" +
291
- connectTimeout + ", socketTimeout =" + socketTimeout + ", serverZoneId=" + serverZoneId +
275
+ ", tcpNoDelay=" + tcpNoDelay + ", tcpKeepAlive=" + tcpKeepAlive +
276
+ ", connectTimeout =" + connectTimeout + ", serverZoneId=" + serverZoneId +
292
277
", zeroDateOption=" + zeroDateOption + ", user='" + user + "', password=" + password +
293
278
", database='" + database + "', createDatabaseIfNotExist=" + createDatabaseIfNotExist +
294
279
", preferPrepareStatement=" + preferPrepareStatement +
@@ -298,8 +283,8 @@ public String toString() {
298
283
", extensions=" + extensions + ", passwordPublisher=" + passwordPublisher + '}' ;
299
284
}
300
285
301
- return "MySqlConnectionConfiguration{unixSocket='" + domain + "', connectTimeout=" +
302
- connectTimeout + ", socketTimeout =" + socketTimeout + ", serverZoneId=" + serverZoneId +
286
+ return "MySqlConnectionConfiguration{unixSocket='" + domain +
287
+ "', connectTimeout =" + connectTimeout + ", serverZoneId=" + serverZoneId +
303
288
", zeroDateOption=" + zeroDateOption + ", user='" + user + "', password=" + password +
304
289
", database='" + database + "', createDatabaseIfNotExist=" + createDatabaseIfNotExist +
305
290
", preferPrepareStatement=" + preferPrepareStatement +
@@ -332,9 +317,6 @@ public static final class Builder {
332
317
@ Nullable
333
318
private Duration connectTimeout ;
334
319
335
- @ Nullable
336
- private Duration socketTimeout ;
337
-
338
320
private String user ;
339
321
340
322
private ZeroDateOption zeroDateOption = ZeroDateOption .USE_NULL ;
@@ -410,7 +392,7 @@ public MySqlConnectionConfiguration build() {
410
392
MySqlSslConfiguration ssl = MySqlSslConfiguration .create (sslMode , tlsVersion , sslHostnameVerifier ,
411
393
sslCa , sslKey , sslKeyPassword , sslCert , sslContextBuilderCustomizer );
412
394
return new MySqlConnectionConfiguration (isHost , domain , port , ssl , tcpKeepAlive , tcpNoDelay ,
413
- connectTimeout , socketTimeout , zeroDateOption , serverZoneId , user , password , database ,
395
+ connectTimeout , zeroDateOption , serverZoneId , user , password , database ,
414
396
createDatabaseIfNotExist , preferPrepareStatement , loadLocalInfilePath ,
415
397
localInfileBufferSize , queryCacheSize , prepareCacheSize ,
416
398
Extensions .from (extensions , autodetectExtensions ), passwordPublisher );
@@ -510,22 +492,6 @@ public Builder connectTimeout(@Nullable Duration connectTimeout) {
510
492
return this ;
511
493
}
512
494
513
- /**
514
- * Configure the socket timeout, only for compatibility with {@code socketTimeout} property in the
515
- * JDBC driver. In fact, {@code SO_TIMEOUT} has effect only for OIO socket transport. Default no
516
- * timeout.
517
- *
518
- * @param socketTimeout the socket timeout, or {@code null} if has no timeout.
519
- * @return this {@link Builder}.
520
- * @since 0.8.6
521
- * @deprecated This option has been deprecated as of version 1.0.1, because it has no effect and
522
- * serves no purpose.
523
- */
524
- public Builder socketTimeout (@ Nullable Duration socketTimeout ) {
525
- this .socketTimeout = socketTimeout ;
526
- return this ;
527
- }
528
-
529
495
/**
530
496
* Set the user for login the database.
531
497
*
0 commit comments