Skip to content

Commit b2d7092

Browse files
committed
Deprecated ListCollectionNamesIterable#maxTime
1 parent e8e91e3 commit b2d7092

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

driver-sync/src/main/com/mongodb/client/ListCollectionNamesIterable.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
package com.mongodb.client;
1818

19+
import com.mongodb.MongoClientSettings;
1920
import com.mongodb.lang.Nullable;
2021
import org.bson.BsonValue;
2122
import org.bson.conversions.Bson;
@@ -45,7 +46,19 @@ public interface ListCollectionNamesIterable extends MongoIterable<String> {
4546
* @param timeUnit the time unit, which may not be null
4647
* @return this
4748
* @mongodb.driver.manual reference/operator/meta/maxTimeMS/ Max Time
49+
* @deprecated Prefer using the operation execution timeout configuration options available at the following levels:
50+
*
51+
* <ul>
52+
* <li>{@link MongoClientSettings.Builder#timeout(long, TimeUnit)}</li>
53+
* <li>{@link MongoDatabase#withTimeout(long, TimeUnit)}</li>
54+
* <li>{@link MongoCollection#withTimeout(long, TimeUnit)}</li>
55+
* <li>{@link ClientSession}</li>
56+
* </ul>
57+
*
58+
* When executing an operation, any explicitly set timeout at these levels takes precedence, rendering this maximum execution time
59+
* irrelevant. If no timeout is specified at these levels, the maximum execution time will be used.
4860
*/
61+
@Deprecated
4962
ListCollectionNamesIterable maxTime(long maxTime, TimeUnit timeUnit);
5063

5164
/**

0 commit comments

Comments
 (0)