Skip to content

Commit 4062ac8

Browse files
authored
SocketTimeout Documentation Update (#145)
Motivation: The SocketTimeout option has been deprecated, but the documentation does not reflect this accurately. Modification: Update the documentation. Result: Cleaned up.
1 parent 173779b commit 4062ac8

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ MySqlConnectionConfiguration configuration = MySqlConnectionConfiguration.builde
171171
.database("r2dbc") // optional, default null, null means not specifying the database
172172
.serverZoneId(ZoneId.of("Continent/City")) // optional, default null, null means query server time zone when connection init
173173
.connectTimeout(Duration.ofSeconds(3)) // optional, default null, null means no timeout
174-
.socketTimeout(Duration.ofSeconds(4)) // optional, default null, null means no timeout
174+
.socketTimeout(Duration.ofSeconds(4)) // deprecated since 1.0.1, because it has no effect and serves no purpose.
175175
.sslMode(SslMode.VERIFY_IDENTITY) // optional, default SslMode.PREFERRED
176176
.sslCa("/path/to/mysql/ca.pem") // required when sslMode is VERIFY_CA or VERIFY_IDENTITY, default null, null means has no server CA cert
177177
.sslCert("/path/to/mysql/client-cert.pem") // optional, default has no client SSL certificate
@@ -218,7 +218,7 @@ Mono<Connection> connectionMono = Mono.from(connectionFactory.create());
218218
| password | Any printable string | Optional, default no password | The password of the MySQL database user |
219219
| database | A valid MySQL database name | Optional, default does not initialize database | Database used by the MySQL connection |
220220
| connectTimeout | A `Duration` which must be positive duration | Optional, default has no timeout | TCP connect timeout |
221-
| socketTimeout | A `Duration` which must be positive duration | Optional, default has no timeout | TCP socket timeout |
221+
| socketTimeout | A `Duration` which must be positive duration | Deprecated since 1.0.1 | TCP socket timeout |
222222
| serverZoneId | An id of `ZoneId` | Optional, default query time zone when connection init | Server time zone id |
223223
| tcpKeepAlive | `true` or `false` | Optional, default disabled | Controls TCP KeepAlive |
224224
| tcpNoDelay | `true` or `false` | Optional, default disabled | Controls TCP NoDelay |

src/main/java/io/asyncer/r2dbc/mysql/MySqlConnectionConfiguration.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,8 @@ public Builder connectTimeout(@Nullable Duration connectTimeout) {
443443
* @param socketTimeout the socket timeout, or {@code null} if has no timeout.
444444
* @return this {@link Builder}.
445445
* @since 0.8.6
446+
* @deprecated This option has been deprecated as of version 1.0.1, because it has no effect and
447+
* serves no purpose.
446448
*/
447449
public Builder socketTimeout(@Nullable Duration socketTimeout) {
448450
this.socketTimeout = socketTimeout;

0 commit comments

Comments
 (0)