Skip to content

Commit b0e8d3d

Browse files
author
Kay Kim
committed
DOCS-11882: Java causal consistency examples
1 parent 27b6efe commit b0e8d3d

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@ examples:
9595
# java crud
9696
curl -SfL https://raw.githubusercontent.com/mongodb/mongo-java-driver/master/driver-sync/src/examples/documentation/DocumentationSamples.java -o ${DRIVERS_PATH}/DocumentationSamples.java
9797
curl -SfL https://raw.githubusercontent.com/mongodb/mongo-java-driver-reactivestreams/master/examples/documentation/src/DocumentationSamples.java -o ${DRIVERS_PATH}/AsyncDocumentationSamples.java
98+
# java causal
99+
curl -SfL https://raw.githubusercontent.com/mongodb/mongo-java-driver/master/driver-sync/src/examples/documentation/CausalConsistencyExamples.java -o ${DRIVERS_PATH}/CausalConsistencyExamples.java
98100

99101
# node
100102
curl -SfL https://raw.githubusercontent.com/mongodb/node-mongodb-native/master/test/examples/change_streams.js -o ${DRIVERS_PATH}/node_changestreams.js

source/core/read-isolation-consistency-recency.txt

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,15 @@ ensure that the update occurs before the insert.
287287
:start-after: Start Causal Consistency Example 1
288288
:end-before: End Causal Consistency Example 1
289289

290+
- id: java-sync
291+
content: |
292+
293+
.. literalinclude:: /driver-examples/CausalConsistencyExamples.java
294+
:language: java
295+
:dedent: 8
296+
:start-after: Start Causal Consistency Example 1
297+
:end-before: End Causal Consistency Example 1
298+
290299
- id: php
291300
content: |
292301

@@ -341,6 +350,15 @@ other session and read after the two writes:
341350
:start-after: Start Causal Consistency Example 2
342351
:end-before: End Causal Consistency Example 2
343352

353+
- id: java-sync
354+
content: |
355+
356+
.. literalinclude:: /driver-examples/CausalConsistencyExamples.java
357+
:language: java
358+
:dedent: 8
359+
:start-after: Start Causal Consistency Example 2
360+
:end-before: End Causal Consistency Example 2
361+
344362
- id: php
345363
content: |
346364

0 commit comments

Comments
 (0)