Skip to content

Commit 85c4dfd

Browse files
committed
Fixed MongoClientOptions and ServerSettings Javadoc to reflect the actual default values for heartbeatFrequence and minHeartbeatFrequency
1 parent 4fa85c8 commit 85c4dfd

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

driver-core/src/main/com/mongodb/connection/ServerSettings.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public static class Builder {
4747
private long minHeartbeatFrequencyMS = 500;
4848

4949
/**
50-
* Sets the frequency that the cluster monitor attempts to reach each server.
50+
* Sets the frequency that the cluster monitor attempts to reach each server. The default value is 10 seconds.
5151
*
5252
* @param heartbeatFrequency the heartbeat frequency
5353
* @param timeUnit the time unit
@@ -60,7 +60,7 @@ public Builder heartbeatFrequency(final long heartbeatFrequency, final TimeUnit
6060

6161
/**
6262
* Sets the minimum heartbeat frequency. In the event that the driver has to frequently re-check a server's availability, it will
63-
* wait at least this long since the previous check to avoid wasted effort. The default value is 10 ms.
63+
* wait at least this long since the previous check to avoid wasted effort. The default value is 500 milliseconds.
6464
*
6565
* @param minHeartbeatFrequency the minimum heartbeat frequency
6666
* @param timeUnit the time unit
@@ -82,7 +82,7 @@ public ServerSettings build() {
8282
}
8383

8484
/**
85-
* Gets the frequency that the cluster monitor attempts to reach each server. The default is every 5 seconds.
85+
* Gets the frequency that the cluster monitor attempts to reach each server. The default value is 10 seconds.
8686
*
8787
* @param timeUnit the time unit
8888
* @return the heartbeat frequency
@@ -93,7 +93,7 @@ public long getHeartbeatFrequency(final TimeUnit timeUnit) {
9393

9494
/**
9595
* Gets the minimum heartbeat frequency. In the event that the driver has to frequently re-check a server's availability, it will wait
96-
* at least this long since the previous check to avoid wasted effort. The default value is 10 ms.
96+
* at least this long since the previous check to avoid wasted effort. The default value is 500 milliseconds.
9797
*
9898
* @param timeUnit the time unit
9999
* @return the heartbeat reconnect retry frequency

driver/src/main/com/mongodb/MongoClientOptions.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ public boolean isSocketKeepAlive() {
299299

300300
/**
301301
* Gets the heartbeat frequency. This is the frequency that the driver will attempt to determine the current state of each server in the
302-
* cluster. The default value is 5000 milliseconds.
302+
* cluster. The default value is 10,000 milliseconds.
303303
*
304304
* @return the heartbeat frequency, in milliseconds
305305
* @since 2.12
@@ -310,7 +310,7 @@ public int getHeartbeatFrequency() {
310310

311311
/**
312312
* Gets the minimum heartbeat frequency. In the event that the driver has to frequently re-check a server's availability,
313-
* it will wait at least this long since the previous check to avoid wasted effort. The default value is 10 ms.
313+
* it will wait at least this long since the previous check to avoid wasted effort. The default value is 500 milliseconds.
314314
*
315315
* @return the minimum heartbeat frequency, in milliseconds
316316
* @since 2.13
@@ -1048,7 +1048,7 @@ public Builder dbEncoderFactory(final DBEncoderFactory dbEncoderFactory) {
10481048

10491049
/**
10501050
* Sets the heartbeat frequency. This is the frequency that the driver will attempt to determine the current state of each server in
1051-
* the cluster.
1051+
* the cluster. The default value is 10,000 milliseconds
10521052
*
10531053
* @param heartbeatFrequency the heartbeat frequency for the cluster, in milliseconds, which must be > 0
10541054
* @return {@code this}
@@ -1063,7 +1063,7 @@ public Builder heartbeatFrequency(final int heartbeatFrequency) {
10631063

10641064
/**
10651065
* Sets the minimum heartbeat frequency. In the event that the driver has to frequently re-check a server's availability,
1066-
* it will wait at least this long since the previous check to avoid wasted effort. The default value is 10ms.
1066+
* it will wait at least this long since the previous check to avoid wasted effort. The default value is 500 milliseconds.
10671067
*
10681068
* @param minHeartbeatFrequency the minimum heartbeat frequency, in milliseconds, which must be > 0
10691069
* @return {@code this}

0 commit comments

Comments
 (0)