Skip to content

Commit 7f5909b

Browse files
committed
watch eg
1 parent 52989b6 commit 7f5909b

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

source/logging-monitoring/change-streams.txt

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
Open Change Streams
66
===================
77

8-
9-
108
.. contents:: On this page
119
:local:
1210
:backlinks: none
@@ -92,7 +90,26 @@ An insert operation on the collection produces the following output:
9290
...
9391
}
9492

95-
For a runnable example, see the :ref:`<java-usage-watch>` usage example page.
93+
watch() Example: Full File
94+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
95+
96+
The following code is a complete, standalone file that performs an ordered bulk
97+
write operation.
98+
99+
.. include:: /includes/crud/example-intro.rst
100+
101+
.. io-code-block::
102+
103+
.. input:: /includes/crud/Watch.java
104+
:language: java
105+
:dedent:
106+
107+
.. output::
108+
:language: none
109+
:visible: false
110+
111+
Received a change to the collection: ChangeStreamDocument{ operationType=insert, resumeToken={...}, namespace=sample_mflix.movies, ... }
112+
96113

97114
To learn more about the ``watch()`` method, see the following API
98115
documentation:

0 commit comments

Comments
 (0)