Skip to content

Commit 0f81b0b

Browse files
committed
Deprecate threadsAllowedToBlockForConnectionMultiplier properties
A final bit of deprecation for wait queue limits. JAVA-3460
1 parent 29edbd4 commit 0f81b0b

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

driver-core/src/main/com/mongodb/ConnectionString.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@
128128
* <li>{@code maxPoolSize=n}: The maximum number of connections in the connection pool.</li>
129129
* <li>{@code waitQueueMultiple=n} : this multiplier, multiplied with the maxPoolSize setting, gives the maximum number of
130130
* threads that may be waiting for a connection to become available from the pool. All further threads will get an
131-
* exception right away.</li>
131+
* exception right away. Note that this configuration option is deprecated and will be removed in the next major release.</li>
132132
* <li>{@code waitQueueTimeoutMS=ms}: The maximum wait time in milliseconds that a thread may wait for a connection to
133133
* become available.</li>
134134
* </ul>
@@ -1209,7 +1209,9 @@ public Integer getMaxConnectionPoolSize() {
12091209
/**
12101210
* Gets the multiplier for the number of threads allowed to block waiting for a connection specified in the connection string.
12111211
* @return the multiplier for the number of threads allowed to block waiting for a connection
1212+
* @deprecated in the next major release, wait queue size limitations will be removed
12121213
*/
1214+
@Deprecated
12131215
@Nullable
12141216
public Integer getThreadsAllowedToBlockForConnectionMultiplier() {
12151217
return threadsAllowedToBlockForConnectionMultiplier;

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,6 @@ public List<MongoCompressor> getCompressorList() {
271271
* <p>Default is 100.</p>
272272
*
273273
* @return the maximum size of the connection pool per host
274-
* @see MongoClientOptions#getThreadsAllowedToBlockForConnectionMultiplier()
275274
*/
276275
public int getConnectionsPerHost() {
277276
return maxConnectionsPerHost;
@@ -296,8 +295,10 @@ public int getMinConnectionsPerHost() {
296295
*
297296
* <p>Default is 5.</p>
298297
*
298+
* @deprecated in the next major release, wait queue size limitations will be removed
299299
* @return the multiplier
300300
*/
301+
@Deprecated
301302
public int getThreadsAllowedToBlockForConnectionMultiplier() {
302303
return threadsAllowedToBlockForConnectionMultiplier;
303304
}
@@ -1188,7 +1189,9 @@ public Builder connectionsPerHost(final int connectionsPerHost) {
11881189
* @return {@code this}
11891190
* @throws IllegalArgumentException if {@code threadsAllowedToBlockForConnectionMultiplier < 1}
11901191
* @see MongoClientOptions#getThreadsAllowedToBlockForConnectionMultiplier()
1192+
* @deprecated in the next major release, wait queue size limitations will be removed
11911193
*/
1194+
@Deprecated
11921195
public Builder threadsAllowedToBlockForConnectionMultiplier(final int threadsAllowedToBlockForConnectionMultiplier) {
11931196
isTrueArgument("threadsAllowedToBlockForConnectionMultiplier must be > 0", threadsAllowedToBlockForConnectionMultiplier > 0);
11941197
this.threadsAllowedToBlockForConnectionMultiplier = threadsAllowedToBlockForConnectionMultiplier;

driver-legacy/src/main/com/mongodb/MongoClientURI.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@
108108
* <li>{@code maxPoolSize=n}: The maximum number of connections in the connection pool.</li>
109109
* <li>{@code waitQueueMultiple=n} : this multiplier, multiplied with the maxPoolSize setting, gives the maximum number of
110110
* threads that may be waiting for a connection to become available from the pool. All further threads will get an
111-
* exception right away.</li>
111+
* exception right away. Note that this configuration option is deprecated and will be removed in the next major release.</li>
112112
* <li>{@code waitQueueTimeoutMS=ms}: The maximum wait time in milliseconds that a thread may wait for a connection to
113113
* become available.</li>
114114
* </ul>

0 commit comments

Comments
 (0)