Skip to content

Commit 4bf96c9

Browse files
committed
Added API docs linking to estimatedDocumentCount
JAVA-3299
1 parent 25a4f87 commit 4bf96c9

File tree

2 files changed

+24
-12
lines changed

2 files changed

+24
-12
lines changed

driver-async/src/main/com/mongodb/async/client/MongoCollection.java

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,8 @@ public interface MongoCollection<TDocument> {
229229
* Counts the number of documents in the collection.
230230
*
231231
* <p>
232-
* Note: When migrating from {@code count()} to {@code countDocuments()} the following query operators must be replaced:
232+
* Note: For a fast count of the total documents in a collection see {@link #estimatedDocumentCount(SingleResultCallback)}.
233+
* When migrating from {@code count()} to {@code countDocuments()} the following query operators must be replaced:
233234
* </p>
234235
* <pre>
235236
*
@@ -253,7 +254,8 @@ public interface MongoCollection<TDocument> {
253254
* Counts the number of documents in the collection according to the given options.
254255
*
255256
* <p>
256-
* Note: When migrating from {@code count()} to {@code countDocuments()} the following query operators must be replaced:
257+
* Note: For a fast count of the total documents in a collection see {@link #estimatedDocumentCount(SingleResultCallback)}.
258+
* When migrating from {@code count()} to {@code countDocuments()} the following query operators must be replaced:
257259
* </p>
258260
* <pre>
259261
*
@@ -278,7 +280,8 @@ public interface MongoCollection<TDocument> {
278280
* Counts the number of documents in the collection according to the given options.
279281
*
280282
* <p>
281-
* Note: When migrating from {@code count()} to {@code countDocuments()} the following query operators must be replaced:
283+
* Note: For a fast count of the total documents in a collection see {@link #estimatedDocumentCount(SingleResultCallback)}.
284+
* When migrating from {@code count()} to {@code countDocuments()} the following query operators must be replaced:
282285
* </p>
283286
* <pre>
284287
*
@@ -304,7 +307,8 @@ public interface MongoCollection<TDocument> {
304307
* Counts the number of documents in the collection.
305308
*
306309
* <p>
307-
* Note: When migrating from {@code count()} to {@code countDocuments()} the following query operators must be replaced:
310+
* Note: For a fast count of the total documents in a collection see {@link #estimatedDocumentCount(SingleResultCallback)}.
311+
* When migrating from {@code count()} to {@code countDocuments()} the following query operators must be replaced:
308312
* </p>
309313
* <pre>
310314
*
@@ -330,7 +334,8 @@ public interface MongoCollection<TDocument> {
330334
* Counts the number of documents in the collection according to the given options.
331335
*
332336
* <p>
333-
* Note: When migrating from {@code count()} to {@code countDocuments()} the following query operators must be replaced:
337+
* Note: For a fast count of the total documents in a collection see {@link #estimatedDocumentCount(SingleResultCallback)}.
338+
* When migrating from {@code count()} to {@code countDocuments()} the following query operators must be replaced:
334339
* </p>
335340
* <pre>
336341
*
@@ -357,7 +362,8 @@ public interface MongoCollection<TDocument> {
357362
* Counts the number of documents in the collection according to the given options.
358363
*
359364
* <p>
360-
* Note: When migrating from {@code count()} to {@code countDocuments()} the following query operators must be replaced:
365+
* Note: For a fast count of the total documents in a collection see {@link #estimatedDocumentCount(SingleResultCallback)}.
366+
* When migrating from {@code count()} to {@code countDocuments()} the following query operators must be replaced:
361367
* </p>
362368
* <pre>
363369
*

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

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,8 @@ public interface MongoCollection<TDocument> {
225225
* Counts the number of documents in the collection.
226226
*
227227
* <p>
228-
* Note: When migrating from {@code count()} to {@code countDocuments()} the following query operators must be replaced:
228+
* Note: For a fast count of the total documents in a collection see {@link #estimatedDocumentCount()}.
229+
* When migrating from {@code count()} to {@code countDocuments()} the following query operators must be replaced:
229230
* </p>
230231
* <pre>
231232
*
@@ -249,7 +250,8 @@ public interface MongoCollection<TDocument> {
249250
* Counts the number of documents in the collection according to the given options.
250251
*
251252
* <p>
252-
* Note: When migrating from {@code count()} to {@code countDocuments()} the following query operators must be replaced:
253+
* Note: For a fast count of the total documents in a collection see {@link #estimatedDocumentCount()}.
254+
* When migrating from {@code count()} to {@code countDocuments()} the following query operators must be replaced:
253255
* </p>
254256
* <pre>
255257
*
@@ -274,7 +276,8 @@ public interface MongoCollection<TDocument> {
274276
* Counts the number of documents in the collection according to the given options.
275277
*
276278
* <p>
277-
* Note: When migrating from {@code count()} to {@code countDocuments()} the following query operators must be replaced:
279+
* Note: For a fast count of the total documents in a collection see {@link #estimatedDocumentCount()}.
280+
* When migrating from {@code count()} to {@code countDocuments()} the following query operators must be replaced:
278281
* </p>
279282
* <pre>
280283
*
@@ -300,7 +303,8 @@ public interface MongoCollection<TDocument> {
300303
* Counts the number of documents in the collection.
301304
*
302305
* <p>
303-
* Note: When migrating from {@code count()} to {@code countDocuments()} the following query operators must be replaced:
306+
* Note: For a fast count of the total documents in a collection see {@link #estimatedDocumentCount()}.
307+
* When migrating from {@code count()} to {@code countDocuments()} the following query operators must be replaced:
304308
* </p>
305309
* <pre>
306310
*
@@ -326,7 +330,8 @@ public interface MongoCollection<TDocument> {
326330
* Counts the number of documents in the collection according to the given options.
327331
*
328332
* <p>
329-
* Note: When migrating from {@code count()} to {@code countDocuments()} the following query operators must be replaced:
333+
* Note: For a fast count of the total documents in a collection see {@link #estimatedDocumentCount()}.
334+
* When migrating from {@code count()} to {@code countDocuments()} the following query operators must be replaced:
330335
* </p>
331336
* <pre>
332337
*
@@ -353,7 +358,8 @@ public interface MongoCollection<TDocument> {
353358
* Counts the number of documents in the collection according to the given options.
354359
*
355360
* <p>
356-
* Note: When migrating from {@code count()} to {@code countDocuments()} the following query operators must be replaced:
361+
* Note: For a fast count of the total documents in a collection see {@link #estimatedDocumentCount()}.
362+
* When migrating from {@code count()} to {@code countDocuments()} the following query operators must be replaced:
357363
* </p>
358364
* <pre>
359365
*

0 commit comments

Comments
 (0)