Skip to content

Commit fb45ab1

Browse files
committed
JAVA-2665: Update links to causal consistency and change stream documentation to use http://dochub.mongodb.org
1 parent d9abec0 commit fb45ab1

File tree

8 files changed

+26
-21
lines changed

8 files changed

+26
-21
lines changed

docs/reference/content/driver-async/tutorials/change-streams.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ title = "Change Streams"
1010

1111
## Change Streams - Draft
1212

13-
MongoDB 3.6 introduces a new [`$changeStream`](https://docs.mongodb.com/manual/operator/aggregation/changeStream) aggregation pipeline
13+
MongoDB 3.6 introduces a new [`$changeStream`](http://dochub.mongodb.org/core/changestreams) aggregation pipeline
1414
operator.
1515

1616
Change streams provide a way to watch changes to documents in a collection. To improve the usability of this new stage, the
@@ -86,7 +86,7 @@ collection.watch().forEach(printBlock, callbackWhenFinished);
8686

8787
The `watch` method can also be passed a list of [aggregation stages]({{< docsref "meta/aggregation-quick-reference" >}}), that can modify
8888
the data returned by the `$changeStream` operator. Note: not all aggregation operators are supported. See the
89-
[`$changeStream`](https://docs.mongodb.com/manual/operator/aggregation/changeStream) documentation for more information.
89+
[`$changeStream`](http://dochub.mongodb.org/core/changestreams) documentation for more information.
9090

9191
In the following example the change stream prints out all changes it observes, for `insert`, `update`, `replace` and `delete` operations:
9292

docs/reference/content/driver/tutorials/change-streams.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ title = "Change Streams"
1010

1111
## Change Streams - Draft
1212

13-
MongoDB 3.6 introduces a new [`$changeStream`](https://docs.mongodb.com/manual/operator/aggregation/changeStream) aggregation pipeline
13+
MongoDB 3.6 introduces a new [`$changeStream`](http://dochub.mongodb.org/core/changestreams) aggregation pipeline
1414
operator.
1515

1616
Change streams provide a way to watch changes to documents in a collection. To improve the usability of this new stage, the
@@ -74,7 +74,7 @@ collection.watch().forEach(printBlock);
7474

7575
The `watch` method can also be passed a list of [aggregation stages]({{< docsref "meta/aggregation-quick-reference" >}}), that can modify
7676
the data returned by the `$changeStream` operator. Note: not all aggregation operators are supported. See the
77-
[`$changeStream`](https://docs.mongodb.com/manual/operator/aggregation/changeStream) documentation for more information.
77+
[`$changeStream`](http://dochub.mongodb.org/core/changestreams) documentation for more information.
7878

7979
In the following example the change stream prints out all changes it observes, for `insert`, `update`, `replace` and `delete` operations:
8080

docs/reference/content/whats-new.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Key new features of the 3.6 Java driver release:
1313

1414
### Change Stream support
1515

16-
The 3.6 release adds support for [change streams](https://docs.mongodb.com/manual/operator/aggregation/changeStream).
16+
The 3.6 release adds support for [change streams](http://dochub.mongodb.org/core/changestreams).
1717

1818
* [Change Stream Quick Start]({{<ref "driver/tutorials/change-streams.md">}})
1919
* [Change Stream Quick Start (Async)]({{<ref "driver-async/tutorials/change-streams.md">}})
@@ -31,8 +31,9 @@ The 3.6 release adds support for compression of messages to and from appropriate
3131
* [Compression Tutorial (Async)]({{<ref "driver-async/tutorials/compression.md">}})
3232

3333
### Causal consistency
34-
35-
The 3.6 release adds support for causally consistency.
34+
35+
The 3.6 release adds support for [causally consistency](http://dochub.mongodb.org/core/causal-consistency) via the new
36+
[`ClientSession`]({{<apiref "com/mongodb/session/ClientSession">}}) API.
3637

3738
### Application-configured server selection
3839

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ public interface MongoCollection<TDocument> {
262262
* Creates a change stream for this collection.
263263
*
264264
* @return the change stream iterable
265-
* @mongodb.driver.manual reference/operator/aggregation/changeStream $changeStream
265+
* @mongodb.driver.dochub core/changestreams Change Streams
266266
* @since 3.6
267267
*/
268268
ChangeStreamIterable<TDocument> watch();
@@ -273,7 +273,7 @@ public interface MongoCollection<TDocument> {
273273
* @param resultClass the class to decode each document into
274274
* @param <TResult> the target document type of the iterable.
275275
* @return the change stream iterable
276-
* @mongodb.driver.manual reference/operator/aggregation/changeStream $changeStream
276+
* @mongodb.driver.dochub core/changestreams Change Streams
277277
* @since 3.6
278278
*/
279279
<TResult> ChangeStreamIterable<TResult> watch(Class<TResult> resultClass);
@@ -283,7 +283,7 @@ public interface MongoCollection<TDocument> {
283283
*
284284
* @param pipeline the aggregation pipeline to apply to the change stream
285285
* @return the change stream iterable
286-
* @mongodb.driver.manual reference/operator/aggregation/changeStream $changeStream
286+
* @mongodb.driver.dochub core/changestreams Change Streams
287287
* @since 3.6
288288
*/
289289
ChangeStreamIterable<TDocument> watch(List<? extends Bson> pipeline);
@@ -295,7 +295,7 @@ public interface MongoCollection<TDocument> {
295295
* @param resultClass the class to decode each document into
296296
* @param <TResult> the target document type of the iterable.
297297
* @return the change stream iterable
298-
* @mongodb.driver.manual reference/operator/aggregation/changeStream $changeStream
298+
* @mongodb.driver.dochub core/changestreams Change Streams
299299
* @since 3.6
300300
*/
301301
<TResult> ChangeStreamIterable<TResult> watch(List<? extends Bson> pipeline, Class<TResult> resultClass);

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
* @mongodb.server.release 3.6
2727
* @since 3.6
2828
* @see ClientSession
29+
* @mongodb.driver.dochub core/causal-consistency Causal Consistency
2930
*/
3031
@Immutable
3132
public final class ClientSessionOptions {
@@ -37,6 +38,7 @@ public final class ClientSessionOptions {
3738
*
3839
* @return whether operations using the session should be causally consistent. A null value indicates to use the the global default,
3940
* which is currently true.
41+
* @mongodb.driver.dochub core/causal-consistency Causal Consistency
4042
*/
4143
public Boolean isCausallyConsistent() {
4244
return causallyConsistent;
@@ -63,6 +65,7 @@ public static final class Builder {
6365
*
6466
* @param causallyConsistent whether operations using the session should be causally consistent
6567
* @return this
68+
* @mongodb.driver.dochub core/causal-consistency Causal Consistency
6669
*/
6770
public Builder causallyConsistent(final boolean causallyConsistent) {
6871
this.causallyConsistent = causallyConsistent;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
/**
2020
* An exception indicating that a failure occurred when running a {@code $changeStream}.
2121
*
22-
* @mongodb.driver.manual reference/operator/aggregation/changeStream $changeStream
22+
* @mongodb.driver.dochub core/changestreams Change Streams
2323
* @since 3.6
2424
*/
2525
public class MongoChangeStreamException extends MongoException {

driver-core/src/main/com/mongodb/session/ClientSession.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
*
2929
* @mongodb.server.release 3.6
3030
* @since 3.6
31+
* @see ClientSessionOptions
3132
*/
3233
@NotThreadSafe
3334
public interface ClientSession extends Closeable {

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

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

1717
package com.mongodb.client;
1818

19-
import com.mongodb.session.ClientSession;
2019
import com.mongodb.MongoNamespace;
2120
import com.mongodb.ReadConcern;
2221
import com.mongodb.ReadPreference;
@@ -38,6 +37,7 @@
3837
import com.mongodb.client.model.WriteModel;
3938
import com.mongodb.client.result.DeleteResult;
4039
import com.mongodb.client.result.UpdateResult;
40+
import com.mongodb.session.ClientSession;
4141
import org.bson.Document;
4242
import org.bson.codecs.configuration.CodecRegistry;
4343
import org.bson.conversions.Bson;
@@ -398,7 +398,7 @@ public interface MongoCollection<TDocument> {
398398
* Creates a change stream for this collection.
399399
*
400400
* @return the change stream iterable
401-
* @mongodb.driver.manual reference/operator/aggregation/changeStream $changeStream
401+
* @mongodb.driver.dochub core/changestreams Change Streams
402402
* @since 3.6
403403
*/
404404
ChangeStreamIterable<TDocument> watch();
@@ -409,7 +409,7 @@ public interface MongoCollection<TDocument> {
409409
* @param resultClass the class to decode each document into
410410
* @param <TResult> the target document type of the iterable.
411411
* @return the change stream iterable
412-
* @mongodb.driver.manual reference/operator/aggregation/changeStream $changeStream
412+
* @mongodb.driver.dochub core/changestreams Change Streams
413413
* @since 3.6
414414
*/
415415
<TResult> ChangeStreamIterable<TResult> watch(Class<TResult> resultClass);
@@ -419,7 +419,7 @@ public interface MongoCollection<TDocument> {
419419
*
420420
* @param pipeline the aggregation pipeline to apply to the change stream.
421421
* @return the change stream iterable
422-
* @mongodb.driver.manual reference/operator/aggregation/changeStream $changeStream
422+
* @mongodb.driver.dochub core/changestreams Change Streams
423423
* @since 3.6
424424
*/
425425
ChangeStreamIterable<TDocument> watch(List<? extends Bson> pipeline);
@@ -431,7 +431,7 @@ public interface MongoCollection<TDocument> {
431431
* @param resultClass the class to decode each document into
432432
* @param <TResult> the target document type of the iterable.
433433
* @return the change stream iterable
434-
* @mongodb.driver.manual reference/operator/aggregation/changeStream $changeStream
434+
* @mongodb.driver.dochub core/changestreams Change Streams
435435
* @since 3.6
436436
*/
437437
<TResult> ChangeStreamIterable<TResult> watch(List<? extends Bson> pipeline, Class<TResult> resultClass);
@@ -443,7 +443,7 @@ public interface MongoCollection<TDocument> {
443443
* @return the change stream iterable
444444
* @since 3.6
445445
* @mongodb.server.release 3.6
446-
* @mongodb.driver.manual reference/operator/aggregation/changeStream $changeStream
446+
* @mongodb.driver.dochub core/changestreams Change Streams
447447
*/
448448
ChangeStreamIterable<TDocument> watch(ClientSession clientSession);
449449

@@ -456,7 +456,7 @@ public interface MongoCollection<TDocument> {
456456
* @return the change stream iterable
457457
* @since 3.6
458458
* @mongodb.server.release 3.6
459-
* @mongodb.driver.manual reference/operator/aggregation/changeStream $changeStream
459+
* @mongodb.driver.dochub core/changestreams Change Streams
460460
*/
461461
<TResult> ChangeStreamIterable<TResult> watch(ClientSession clientSession, Class<TResult> resultClass);
462462

@@ -468,7 +468,7 @@ public interface MongoCollection<TDocument> {
468468
* @return the change stream iterable
469469
* @since 3.6
470470
* @mongodb.server.release 3.6
471-
* @mongodb.driver.manual reference/operator/aggregation/changeStream $changeStream
471+
* @mongodb.driver.dochub core/changestreams Change Streams
472472
*/
473473
ChangeStreamIterable<TDocument> watch(ClientSession clientSession, List<? extends Bson> pipeline);
474474

@@ -482,7 +482,7 @@ public interface MongoCollection<TDocument> {
482482
* @return the change stream iterable
483483
* @since 3.6
484484
* @mongodb.server.release 3.6
485-
* @mongodb.driver.manual reference/operator/aggregation/changeStream $changeStream
485+
* @mongodb.driver.dochub core/changestreams Change Streams
486486
*/
487487
<TResult> ChangeStreamIterable<TResult> watch(ClientSession clientSession, List<? extends Bson> pipeline, Class<TResult> resultClass);
488488

0 commit comments

Comments
 (0)