@@ -49,11 +49,11 @@ To add the driver to your project with Gradle, add the following code to your
4949
5050``` groovy
5151repositories {
52- mavenCentral()
52+ mavenCentral()
5353}
5454
5555dependencies {
56- implementation 'com.arangodb:arangodb-java-driver:7.x.x'
56+ implementation 'com.arangodb:arangodb-java-driver:7.x.x'
5757}
5858```
5959
@@ -143,41 +143,51 @@ for example:
143143
144144``` java
145145ArangoDB adb = new ArangoDB .Builder ()
146- // ...
147- .build();
148- ArangoDBAsync adbAsync = adb. async();
149- CompletableFuture<ArangoDBVersion > version = adbAsync. getVersion();
146+ // ...
147+ .build();
148+ ArangoDBAsync adbAsync = adb. async();
149+ CompletableFuture<ArangoDBVersion > version = adbAsync. getVersion();
150150// ...
151151```
152152
153153Under the hood, both synchronous and asynchronous API use the same internal
154154communication layer, which has been reworked and re-implemented in an
155155asynchronous way. The synchronous API blocks and waits for the result, while the
156- asynchronous one returns a ` CompletableFuture<> ` representing the pending
156+ asynchronous one returns a ` CompletableFuture<> ` representing the pending
157157operation being performed.
158158Each asynchronous API method is equivalent to the corresponding synchronous
159159variant, except for the Cursor API.
160160
161161### Async Cursor API
162162
163163The Cursor API (` ArangoCursor ` and ` ArangoCursorAsync ` ) is intrinsically different,
164- because the synchronous Cursor API is based on Java's ` java.util.Iterator ` , which
164+ because the synchronous Cursor API is based on Java's ` java.util.Iterator ` , which
165165is an interface only suitable for synchronous scenarios.
166- On the other side, the asynchronous Cursor API provides a method
167- ` com.arangodb.ArangoCursorAsync#nextBatch() ` , which returns a
168- ` CompletableFuture<ArangoCursorAsync<T>> ` and can be used to consume the next
166+ On the other side, the asynchronous Cursor API provides a method
167+ ` com.arangodb.ArangoCursorAsync#nextBatch() ` , which returns a
168+ ` CompletableFuture<ArangoCursorAsync<T>> ` and can be used to consume the next
169169batch of the cursor, for example:
170170
171171``` java
172172CompletableFuture<ArangoCursorAsync<Integer > > future1 = adbAsync. db()
173173 .query(" FOR i IN i..10000" , Integer . class);
174- CompletableFuture<ArangoCursorAsync<Integer > > future2 = future1
174+ CompletableFuture<ArangoCursorAsync<Integer > > future2 = future1
175175 .thenCompose(c - > {
176- List<Integer > batch = c. getResult();
177- // ...
178- // consume batch
179- // ...
180- return c. nextBatch();
176+ List<Integer > batch = c. getResult();
177+ // ...
178+ // consume batch
179+ // ...
180+ return c. nextBatch();
181181 });
182182// ...
183183```
184+
185+ ## Data Definition Classes
186+
187+ Classes used to exchange data definitions, in particular classes in the packages
188+ ` com.arangodb.entity.** ` and ` com.arangodb.model.** ` , are meant to be serialized
189+ and deserialized internally by the driver.
190+
191+ The behavior to serialize and deserialize these classes is considered an internal
192+ implementation detail, and as such, it might change without prior notice.
193+ The API with regard to the public members of these classes is kept compatible.
0 commit comments