@@ -131,6 +131,15 @@ application's MongoClient:
131
131
:start-after: Start Versioned API Example 1
132
132
:end-before: End Versioned API Example 1
133
133
134
+ .. tab::
135
+ :tabid: java-sync
136
+
137
+ .. literalinclude:: /includes/driver-examples/versioned-api-java-example.java
138
+ :language: java-sync
139
+ :dedent: 4
140
+ :start-after: Start Versioned API Example 1
141
+ :end-before: End Versioned API Example 1
142
+
134
143
``"1"`` is currently the only API version available.
135
144
136
145
By default, clients are *non-strict*. A non-strict client allows you
@@ -209,6 +218,15 @@ Use the sample code to create a *strict* client:
209
218
:start-after: Start Versioned API Example 2
210
219
:end-before: End Versioned API Example 2
211
220
221
+ .. tab::
222
+ :tabid: java-sync
223
+
224
+ .. literalinclude:: /includes/driver-examples/versioned-api-java-example.java
225
+ :language: java-sync
226
+ :dedent: 4
227
+ :start-after: Start Versioned API Example 2
228
+ :end-before: End Versioned API Example 2
229
+
212
230
Migrate To Versioned API Commands
213
231
---------------------------------
214
232
@@ -359,6 +377,15 @@ Use the sample code to create a *non-strict* client:
359
377
:start-after: Start Versioned API Example 3
360
378
:end-before: End Versioned API Example 3
361
379
380
+ .. tab::
381
+ :tabid: java-sync
382
+
383
+ .. literalinclude:: /includes/driver-examples/versioned-api-java-example.java
384
+ :language: java-sync
385
+ :dedent: 4
386
+ :start-after: Start Versioned API Example 3
387
+ :end-before: End Versioned API Example 3
388
+
362
389
Using this non-strict client allows you to run commands outside of the
363
390
Versioned API. For example, this non-strict client now allows you to
364
391
use the :dbcommand:`count` command once again.
0 commit comments