@@ -306,7 +306,7 @@ public int getConnectTimeout() {
306306 *
307307 * <p>Default is 0 and means no timeout.</p>
308308 *
309- * @return the socket timeout
309+ * @return the socket timeout, in milliseconds
310310 */
311311 public int getSocketTimeout () {
312312 return socketTimeout ;
@@ -939,7 +939,7 @@ public Builder threadsAllowedToBlockForConnectionMultiplier(final int threadsAll
939939 * <p> A value of 0 means that it will timeout immediately if no server is available. A negative value means to wait
940940 * indefinitely.</p>
941941 *
942- * @param serverSelectionTimeout the server selection timeout
942+ * @param serverSelectionTimeout the server selection timeout, in milliseconds
943943 * @return {@code this}
944944 * @see com.mongodb.MongoClientOptions#getServerSelectionTimeout()
945945 */
@@ -951,7 +951,7 @@ public Builder serverSelectionTimeout(final int serverSelectionTimeout) {
951951 /**
952952 * Sets the maximum time that a thread will block waiting for a connection.
953953 *
954- * @param maxWaitTime the maximum wait time
954+ * @param maxWaitTime the maximum wait time, in milliseconds
955955 * @return {@code this}
956956 * @see MongoClientOptions#getMaxWaitTime()
957957 */
@@ -963,9 +963,9 @@ public Builder maxWaitTime(final int maxWaitTime) {
963963 /**
964964 * Sets the maximum idle time for a pooled connection.
965965 *
966- * @param maxConnectionIdleTime the maximum idle time
966+ * @param maxConnectionIdleTime the maximum idle time, in milliseconds, which must be > 0
967967 * @return {@code this}
968- * @throws IllegalArgumentException if {@code aMaxConnectionIdleTime < 0}
968+ * @throws IllegalArgumentException if {@code maxConnectionIdleTime <= 0}
969969 * @see com.mongodb.MongoClientOptions#getMaxConnectionIdleTime()
970970 * @since 2.12
971971 */
@@ -977,9 +977,9 @@ public Builder maxConnectionIdleTime(final int maxConnectionIdleTime) {
977977 /**
978978 * Sets the maximum life time for a pooled connection.
979979 *
980- * @param maxConnectionLifeTime the maximum life time
980+ * @param maxConnectionLifeTime the maximum life time, in milliseconds, which must be > 0
981981 * @return {@code this}
982- * @throws IllegalArgumentException if {@code aMaxConnectionIdleTime < 0}
982+ * @throws IllegalArgumentException if {@code maxConnectionLifeTime <= 0}
983983 * @see com.mongodb.MongoClientOptions#getMaxConnectionIdleTime()
984984 * @since 2.12
985985 */
@@ -992,7 +992,8 @@ public Builder maxConnectionLifeTime(final int maxConnectionLifeTime) {
992992 /**
993993 * Sets the connection timeout.
994994 *
995- * @param connectTimeout the connection timeout
995+ * @param connectTimeout the connection timeout, in milliseconds, which must be > 0
996+ * @throws IllegalArgumentException if {@code connectTimeout <= 0}
996997 * @return {@code this}
997998 * @see com.mongodb.MongoClientOptions#getConnectTimeout()
998999 */
@@ -1005,7 +1006,7 @@ public Builder connectTimeout(final int connectTimeout) {
10051006 /**
10061007 * Sets the socket timeout.
10071008 *
1008- * @param socketTimeout the socket timeout
1009+ * @param socketTimeout the socket timeout, in milliseconds
10091010 * @return {@code this}
10101011 * @see com.mongodb.MongoClientOptions#getSocketTimeout()
10111012 */
@@ -1239,6 +1240,7 @@ public Builder dbEncoderFactory(final DBEncoderFactory dbEncoderFactory) {
12391240 *
12401241 * @param heartbeatFrequency the heartbeat frequency for the cluster, in milliseconds, which must be > 0
12411242 * @return {@code this}
1243+ * @throws IllegalArgumentException if heartbeatFrequency is not > 0
12421244 * @see MongoClientOptions#getHeartbeatFrequency()
12431245 * @since 2.12
12441246 */
@@ -1254,6 +1256,7 @@ public Builder heartbeatFrequency(final int heartbeatFrequency) {
12541256 *
12551257 * @param minHeartbeatFrequency the minimum heartbeat frequency, in milliseconds, which must be > 0
12561258 * @return {@code this}
1259+ * @throws IllegalArgumentException if {@code minHeartbeatFrequency <= 0}
12571260 * @see MongoClientOptions#getMinHeartbeatFrequency()
12581261 * @since 2.13
12591262 */
@@ -1266,7 +1269,7 @@ public Builder minHeartbeatFrequency(final int minHeartbeatFrequency) {
12661269 /**
12671270 * Sets the connect timeout for connections used for the cluster heartbeat.
12681271 *
1269- * @param connectTimeout the connection timeout
1272+ * @param connectTimeout the connection timeout, in milliseconds
12701273 * @return {@code this}
12711274 * @see MongoClientOptions#getHeartbeatConnectTimeout()
12721275 * @since 2.12
@@ -1279,7 +1282,7 @@ public Builder heartbeatConnectTimeout(final int connectTimeout) {
12791282 /**
12801283 * Sets the socket timeout for connections used for the cluster heartbeat.
12811284 *
1282- * @param socketTimeout the socket timeout
1285+ * @param socketTimeout the socket timeout, in milliseconds
12831286 * @return {@code this}
12841287 * @see MongoClientOptions#getHeartbeatSocketTimeout()
12851288 * @since 2.12
@@ -1292,9 +1295,9 @@ public Builder heartbeatSocketTimeout(final int socketTimeout) {
12921295 /**
12931296 * Sets the local threshold.
12941297 *
1295- * @param localThreshold the acceptable latency difference, in milliseconds
1298+ * @param localThreshold the acceptable latency difference, in milliseconds, which must be >= 0
12961299 * @return {@code this}
1297- * @throws IllegalArgumentException if acceptableLatencyDifference < 0
1300+ * @throws IllegalArgumentException if {@code localThreshold < 0}
12981301 * @see com.mongodb.MongoClientOptions#getLocalThreshold()
12991302 * @since 2.13.0
13001303 */
0 commit comments