Skip to content

Commit ba601c5

Browse files
code module include:: fixes
1 parent 24b3430 commit ba601c5

23 files changed

+211
-211
lines changed

modules/concept-docs/pages/compression.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ To safeguard against the case of several thousand documents stealing CPU time to
8080

8181
[source,java]
8282
----
83-
include::example$CompressionExample.java[tag=compression_1,indent=0]
83+
include::devguide:example$java/CompressionExample.java[tag=compression_1,indent=0]
8484
----
8585

8686

modules/concept-docs/pages/transactions-cleanup.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ The cleanup settings can be configured as so:
1818

1919
[source,java]
2020
----
21-
include::howtos:example$TransactionsExample.java[tag=config-cleanup,indent=0]
21+
include::devguide:example$java/TransactionsExample.java[tag=config-cleanup,indent=0]
2222
----
2323

2424
The settings supported by `TransactionsCleanupConfig` are:
@@ -38,7 +38,7 @@ If an application needs to monitor cleanup, it may subscribe to these events:
3838

3939
[source,java]
4040
----
41-
include::howtos:example$TransactionsExample.java[tag=cleanup-events,indent=0]
41+
include::devguide:example$java/TransactionsExample.java[tag=cleanup-events,indent=0]
4242
----
4343

4444
`TransactionCleanupEndRunEvent` is raised whenever a current 'run' is finished, and contains statistics from the run.

modules/concept-docs/pages/transactions-error-handling.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ include::{version-common}@sdk:shared:partial$acid-transactions.adoc[tag=txnfaile
1919

2020
[source,java]
2121
----
22-
include::howtos:example$TransactionsExample.java[tag=config-expiration,indent=0]
22+
include::devguide:example$java/TransactionsExample.java[tag=config-expiration,indent=0]
2323
----
2424

2525
Alternatively it can be configured at the per-transaction level:
2626

2727
[source,java]
2828
----
29-
include::howtos:example$TransactionsExample.java[tag=config-expiration-per,indent=0]
29+
include::devguide:example$java/TransactionsExample.java[tag=config-expiration-per,indent=0]
3030
----
3131

3232
include::{version-common}@sdk:shared:partial$acid-transactions.adoc[tag=txnfailed1]
@@ -37,5 +37,5 @@ Pulling all of the above together, this is the suggested best practice for error
3737

3838
[source,java]
3939
----
40-
include::howtos:example$TransactionsExample.java[tag=full-error-handling,indent=0]
40+
include::devguide:example$java/TransactionsExample.java[tag=full-error-handling,indent=0]
4141
----

modules/concept-docs/pages/transactions.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ include::{version-common}@sdk:shared:partial$acid-transactions.adoc[tags=intro]
1919

2020
[source,java]
2121
----
22-
include::howtos:example$TransactionsExample.java[tag=create-simple,indent=0]
22+
include::devguide:example$java/TransactionsExample.java[tag=create-simple,indent=0]
2323
----
2424

2525
include::{version-common}@sdk:shared:partial$acid-transactions.adoc[tags=mechanics;!library-cleanup-process]
@@ -39,7 +39,7 @@ The application can use this to signal why it triggered a rollback, as so:
3939

4040
[source,java]
4141
----
42-
include::howtos:example$TransactionsExample.java[tag=rollback-cause,indent=0]
42+
include::devguide:example$java/TransactionsExample.java[tag=rollback-cause,indent=0]
4343
----
4444

4545
After a transaction is rolled back, it cannot be committed, no further operations are allowed on it, and the SDK will not try to automatically commit it at the end of the code block.
@@ -58,14 +58,14 @@ include::{version-common}@sdk:shared:partial$acid-transactions.adoc[tag=custom-m
5858

5959
[source,java]
6060
----
61-
include::howtos:example$TransactionsExample.java[tag=custom-metadata,indent=0]
61+
include::devguide:example$java/TransactionsExample.java[tag=custom-metadata,indent=0]
6262
----
6363

6464
or at an individual transaction level with:
6565

6666
[source,java]
6767
----
68-
include::howtos:example$TransactionsExample.java[tag=custom-metadata-per,indent=0]
68+
include::devguide:example$java/TransactionsExample.java[tag=custom-metadata-per,indent=0]
6969
----
7070

7171
include::{version-common}@sdk:shared:partial$acid-transactions.adoc[tag=integrated-sdk-custom-metadata-2,indent=0]

modules/howtos/pages/analytics-using-sdk.adoc

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,14 @@ Before starting, here's all imports used in the following examples:
3434

3535
[source,java]
3636
----
37-
include::example$Analytics.java[tag=imports,indent=0]
37+
include::devguide:example$java/Analytics.java[tag=imports,indent=0]
3838
----
3939

4040
Here's a complete example of doing an analytics query and handling the results:
4141

4242
[source,java]
4343
----
44-
include::example$Analytics.java[tag=simple,indent=0]
44+
include::devguide:example$java/Analytics.java[tag=simple,indent=0]
4545
----
4646

4747
Let's break it down. An analytics query is always performed at the `Cluster` level, using the `analyticsQuery` method. It takes the statement as a required argument and then allows to provide additional options if needed (in the example above, no options are specified).
@@ -66,14 +66,14 @@ The first example shows how to provide them by name:
6666

6767
[source,java]
6868
----
69-
include::example$Analytics.java[tag=named,indent=0]
69+
include::devguide:example$java/Analytics.java[tag=named,indent=0]
7070
----
7171

7272
The second example by position:
7373

7474
[source,java]
7575
----
76-
include::example$Analytics.java[tag=positional,indent=0]
76+
include::devguide:example$java/Analytics.java[tag=positional,indent=0]
7777
----
7878

7979
What style you choose is up to you, for readability in more complex queries we generally recommend using the named parameters.
@@ -88,7 +88,7 @@ Rows can be consumed either through a `JsonObject` directly, turned into a java
8888

8989
[source,java]
9090
----
91-
include::example$Analytics.java[tag=rowsasobject,indent=0]
91+
include::devguide:example$java/Analytics.java[tag=rowsasobject,indent=0]
9292
----
9393

9494

@@ -110,7 +110,7 @@ For example, here is how you can print the `executionTime` of a query:
110110

111111
[source,java]
112112
----
113-
include::example$Analytics.java[tag=printmetrics,indent=0]
113+
include::devguide:example$java/Analytics.java[tag=printmetrics,indent=0]
114114
----
115115

116116
== Analytics Options
@@ -136,7 +136,7 @@ By default, the analytics engine will return whatever is currently in the index
136136

137137
[source,java]
138138
----
139-
include::example$Analytics.java[tag=scanconsistency,indent=0]
139+
include::devguide:example$java/Analytics.java[tag=scanconsistency,indent=0]
140140
----
141141

142142

@@ -146,7 +146,7 @@ The SDK will always send a client context ID with each query, even if none is pr
146146

147147
[source,java]
148148
----
149-
include::example$Analytics.java[tag=clientcontextid,indent=0]
149+
include::devguide:example$java/Analytics.java[tag=clientcontextid,indent=0]
150150
----
151151

152152

@@ -156,7 +156,7 @@ By default, every analytics query has the same priority on the server. By settin
156156

157157
[source,java]
158158
----
159-
include::example$Analytics.java[tag=priority,indent=0]
159+
include::devguide:example$java/Analytics.java[tag=priority,indent=0]
160160
----
161161

162162

@@ -166,7 +166,7 @@ If the query is marked as readonly, both the server and the SDK can improve proc
166166

167167
[source,java]
168168
----
169-
include::example$Analytics.java[tag=readonly,indent=0]
169+
include::devguide:example$java/Analytics.java[tag=readonly,indent=0]
170170
----
171171

172172
=== Custom JSON Serializer
@@ -192,14 +192,14 @@ A simple reactive query is similar to the blocking one:
192192

193193
[source,java]
194194
----
195-
include::example$Analytics.java[tag=simplereactive,indent=0]
195+
include::devguide:example$java/Analytics.java[tag=simplereactive,indent=0]
196196
----
197197

198198
This query will stream all rows as they become available from the server. If you want to manually control the data flow (which is important if you are streaming a lot of rows which could cause a potential out of memory situation) you can do this by using explicit `request()` calls.
199199

200200
[source,java]
201201
----
202-
include::example$Analytics.java[tag=backpressure,indent=0]
202+
include::devguide:example$java/Analytics.java[tag=backpressure,indent=0]
203203
----
204204

205205
In this example we initially request a batch size of 10 rows (so streaming can begin).

modules/howtos/pages/collecting-information-and-logging.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ If you want to set it to DEBUG (or the JUL equivalent: Fine) you can do it like
186186

187187
[source,java]
188188
----
189-
include::example$CollectingInformationAndLogging.java[tag=collecting_information_and_logging_1,indent=0]
189+
include::devguide:example$java/CollectingInformationAndLogging.java[tag=collecting_information_and_logging_1,indent=0]
190190
----
191191

192192
TIP: We do not recommend using JUL in production.
@@ -215,7 +215,7 @@ The following code subscribes to the event bus and prints out all events that ar
215215

216216
[source,java]
217217
----
218-
include::example$CollectingInformationAndLogging.java[tag=collecting_information_and_logging_3,indent=0]
218+
include::devguide:example$java/CollectingInformationAndLogging.java[tag=collecting_information_and_logging_3,indent=0]
219219
----
220220

221221
This leads to output similar to this:
@@ -246,7 +246,7 @@ If you want to redact client logs (for example before handing them off to the Co
246246

247247
[source,java]
248248
----
249-
include::example$CollectingInformationAndLogging.java[tag=collecting_information_and_logging_4,indent=0]
249+
include::devguide:example$java/CollectingInformationAndLogging.java[tag=collecting_information_and_logging_4,indent=0]
250250
----
251251

252252
Different redaction levels are supported -- please see the `RedactionLevel` enum description for more information.

modules/howtos/pages/concurrent-async-apis.adoc

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Each blocking API provides access to its reactive counterpart through the `react
1313

1414
[source,java]
1515
----
16-
include::example$AsyncOperations.java[tag=access]
16+
include::devguide:example$java/AsyncOperations.java[tag=access]
1717
----
1818

1919
The reactive API uses the https://projectreactor.io/[Project Reactor] library as the underlying implementation, so it exposes its `Mono` and `Flux` types accordingly. As a rule of thumb, if the blocking API returns a type `T` the reactive counterpart returns `Mono<T>` if one (or no) results is expected or in some cases `Flux<T>` if there are more than one expected. We *highly* recommend that you make yourself familar with the https://projectreactor.io/docs/core/release/reference/[reactor documentation] to understand its fundamentals and also unlock its full potential.
@@ -22,14 +22,14 @@ The following example fetches a document and prints out the `GetResult` once it
2222

2323
[source,java]
2424
----
25-
include::example$AsyncOperations.java[tag=simple-get]
25+
include::devguide:example$java/AsyncOperations.java[tag=simple-get]
2626
----
2727

2828
It is important to understand that reactive types are lazy, which means that they are only executed when a consumer subscribes to them. So a code like this won't even be executed at all:
2929

3030
[source,java]
3131
----
32-
include::example$AsyncOperations.java[tag=non-used-upsert]
32+
include::devguide:example$java/AsyncOperations.java[tag=non-used-upsert]
3333
----
3434

3535
Modern IDEs like IntelliJ even warn you about that:
@@ -40,7 +40,7 @@ You will come across the `Flux` type in APIs like query where there is one or mo
4040

4141
[source,java]
4242
----
43-
include::example$AsyncOperations.java[tag=verbose-query]
43+
include::devguide:example$java/AsyncOperations.java[tag=verbose-query]
4444
----
4545

4646
The `QueryResult` itself is wrapped in a `Mono`, but the class itself carries a `Flux<T>` of rows where `T` is a type of choice you can convert it to (in this example we simply convert it into `JsonObject`). The `flatMap` operator allows to map the stream or rows into the previous stream of the original result. If you have more question on how this works, check out the documentation https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Flux.html#flatMap-java.util.function.Function-[here].
@@ -52,7 +52,7 @@ You can access this API by using the `async()` accessor methods both on the bloc
5252

5353
[source,java]
5454
----
55-
include::example$AsyncOperations.java[tag=access-async]
55+
include::devguide:example$java/AsyncOperations.java[tag=access-async]
5656
----
5757

5858
We recommend using this API only if you are either writing integration code for higher level concurrency mechanisms or you really need the last drop of performance. In all other cases, the blocking API (for simplicity) or the reactive API (for richness in operators) is likely the better choice.
@@ -64,7 +64,7 @@ While it can be done with the async API as well, we recommend using the reactive
6464

6565
[source,java]
6666
----
67-
include::example$AsyncOperations.java[tag=simple-bulk]
67+
include::devguide:example$java/AsyncOperations.java[tag=simple-bulk]
6868
----
6969

7070
This code grabs a list of keys to fetch and passes them to `ReactiveCollection#get(String)`. Since this is happening asynchronously, the results will return in whatever order they come back from the server cluster. The `block()` at the end waits until all results have been collected. Of course the blocking part at the end is optional, but it shows that you can mix and match reactive and blocking code to on the one hand benefit from simplicity, but always go one layer below for the more powerful concepts if needed.
@@ -75,7 +75,7 @@ Here is how you can ignore individual errors:
7575

7676
[source,java]
7777
----
78-
include::example$AsyncOperations.java[tag=ignore-bulk]
78+
include::devguide:example$java/AsyncOperations.java[tag=ignore-bulk]
7979
----
8080

8181
The `.onErrorResume(e -> Mono.empty()))` returns an empty `Mono` regardless of the error. Since you have the exception in scope, you can also decide based on the actual error if you want to ignore it or propagate/fallback to a different reactive computation.
@@ -84,7 +84,7 @@ If you want to separate out failures from completions, one way would be to use s
8484

8585
[source,java]
8686
----
87-
include::example$AsyncOperations.java[tag=split-bulk]
87+
include::devguide:example$java/AsyncOperations.java[tag=split-bulk]
8888
----
8989

9090
If the result succeeds the side-effect method `doOnNext` is used to store it into the `successfulResults` and if the operation fails we are utilizing the same operator as before (`onErrorResume`) to store it in the `erroredResults` map -- but then also to ignore it for the overall sequence.
@@ -93,7 +93,7 @@ Finally, it is also possible to retry individual failures before giving up. The
9393

9494
[source,java]
9595
----
96-
include::example$AsyncOperations.java[tag=retry-bulk]
96+
include::devguide:example$java/AsyncOperations.java[tag=retry-bulk]
9797
----
9898

9999
It is recommended to check out the `retry` and `retryBackoff` methods for their configuration options and overloads. Of course, all the operators shown here can be combined to achieve exactly the semantics you need. Finally, for even advanced retry policies you can utilize the retry functionality in the https://projectreactor.io/docs/extra/release/api/reactor/retry/Retry.html[reactor-extra] package.
@@ -122,7 +122,7 @@ Then, you can use the various conversion methods to convert back and forth betwe
122122

123123
[source,java]
124124
----
125-
include::example$AsyncOperations.java[tag=rs-conversion]
125+
include::devguide:example$java/AsyncOperations.java[tag=rs-conversion]
126126
----
127127

128128
The same strategy can be used to convert to https://akka.io/[Akka], but if you are working in the scala world we recommend using our first-class Scala SDK directly instead!

modules/howtos/pages/concurrent-document-mutations.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ include::{version-common}@sdk:shared:partial$cas.adoc[tag=errors]
1414

1515
[source,java]
1616
----
17-
include::example$Cas.java[tag=handlingerrors,indent=0]
17+
include::devguide:example$java/Cas.java[tag=handlingerrors,indent=0]
1818
----
1919

2020
Sometimes more logic is needed when performing updates, for example, if a property is mutually exclusive with another property; only one or the other can exist, but not both.
@@ -28,7 +28,7 @@ include::{version-common}@sdk:shared:partial$cas.adoc[tag=locking]
2828

2929
[source,java]
3030
----
31-
include::example$Cas.java[tag=locking,indent=0]
31+
include::devguide:example$java/Cas.java[tag=locking,indent=0]
3232
----
3333

3434
The handler will unlock the item either via an explicit unlock operation ([.api]`unlock`) or implicitly via modifying the item with the correct CAS.

0 commit comments

Comments
 (0)