File tree Expand file tree Collapse file tree 2 files changed +11
-9
lines changed Expand file tree Collapse file tree 2 files changed +11
-9
lines changed Original file line number Diff line number Diff line change 67
67
- id: java-sync
68
68
content: |
69
69
70
- You can implement a ` ` com.mongodb.Block ` ` to print the results
71
- of the iteration
70
+ You can implement a ` ` java.util.function.Consumer ` ` to print the
71
+ results of the iteration
72
72
73
73
.. code-block:: java
74
74
75
- Block< Document> printBlock = new Block<Document> () {
76
- @Override
77
- public void apply(final Document document) {
78
- System.out.println(document.toJson ());
75
+ Consumer< Document> printConsumer = new Consumer<Document> () {
76
+ public void accept(final Document doc) {
77
+ System.out.println(doc.toJson ());
79
78
}
80
79
};
81
80
82
81
Then iterate the cursor for documents, passing the
83
- ` ` printBlock ` ` as a parameter.
82
+ ` ` printConsumer ` ` as a parameter.
84
83
85
84
.. code-block:: java
86
85
87
- findIterable.forEach(printBlock );
86
+ findIterable.forEach(printConsumer );
88
87
89
88
- id: nodejs
90
89
content: |
Original file line number Diff line number Diff line change 18
18
19
19
If your deployment is currently a standalone instance, you must first
20
20
:manual: `convert it to a replica set </tutorial/convert-standalone-to-replica-set> `.
21
- Live migration of data from sharded clusters is not supported.
21
+
22
+ Live migration of data from sharded clusters is not supported. Your destination
23
+ cluster may be sharded, but your source cluster must be an unsharded replica
24
+ set.
22
25
23
26
* (Optional) Enabled authentication on your source deployment.
24
27
You can’t perform that action at this time.
0 commit comments