From 4062ac8878f4e4c4c5c61cc4622f70862f4e39cd Mon Sep 17 00:00:00 2001 From: jchrys Date: Sat, 16 Sep 2023 20:32:37 +0900 Subject: [PATCH] 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. --- README.md | 4 ++-- .../io/asyncer/r2dbc/mysql/MySqlConnectionConfiguration.java | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c9eb75448..a888a0aec 100644 --- a/README.md +++ b/README.md @@ -171,7 +171,7 @@ MySqlConnectionConfiguration configuration = MySqlConnectionConfiguration.builde .database("r2dbc") // optional, default null, null means not specifying the database .serverZoneId(ZoneId.of("Continent/City")) // optional, default null, null means query server time zone when connection init .connectTimeout(Duration.ofSeconds(3)) // optional, default null, null means no timeout - .socketTimeout(Duration.ofSeconds(4)) // optional, default null, null means no timeout + .socketTimeout(Duration.ofSeconds(4)) // deprecated since 1.0.1, because it has no effect and serves no purpose. .sslMode(SslMode.VERIFY_IDENTITY) // optional, default SslMode.PREFERRED .sslCa("/path/to/mysql/ca.pem") // required when sslMode is VERIFY_CA or VERIFY_IDENTITY, default null, null means has no server CA cert .sslCert("/path/to/mysql/client-cert.pem") // optional, default has no client SSL certificate @@ -218,7 +218,7 @@ Mono connectionMono = Mono.from(connectionFactory.create()); | password | Any printable string | Optional, default no password | The password of the MySQL database user | | database | A valid MySQL database name | Optional, default does not initialize database | Database used by the MySQL connection | | connectTimeout | A `Duration` which must be positive duration | Optional, default has no timeout | TCP connect timeout | -| socketTimeout | A `Duration` which must be positive duration | Optional, default has no timeout | TCP socket timeout | +| socketTimeout | A `Duration` which must be positive duration | Deprecated since 1.0.1 | TCP socket timeout | | serverZoneId | An id of `ZoneId` | Optional, default query time zone when connection init | Server time zone id | | tcpKeepAlive | `true` or `false` | Optional, default disabled | Controls TCP KeepAlive | | tcpNoDelay | `true` or `false` | Optional, default disabled | Controls TCP NoDelay | diff --git a/src/main/java/io/asyncer/r2dbc/mysql/MySqlConnectionConfiguration.java b/src/main/java/io/asyncer/r2dbc/mysql/MySqlConnectionConfiguration.java index 82e779c95..0b20465b8 100644 --- a/src/main/java/io/asyncer/r2dbc/mysql/MySqlConnectionConfiguration.java +++ b/src/main/java/io/asyncer/r2dbc/mysql/MySqlConnectionConfiguration.java @@ -443,6 +443,8 @@ public Builder connectTimeout(@Nullable Duration connectTimeout) { * @param socketTimeout the socket timeout, or {@code null} if has no timeout. * @return this {@link Builder}. * @since 0.8.6 + * @deprecated This option has been deprecated as of version 1.0.1, because it has no effect and + * serves no purpose. */ public Builder socketTimeout(@Nullable Duration socketTimeout) { this.socketTimeout = socketTimeout;