Skip to content

Commit 5099dd5

Browse files
committed
Clarify the paging predicate chapter
There were some problems with that chapter. Namely, - Explanation of the code sample was not clear. For example, ``values`` should refer to the method call, but it was used in plural form, probably referring to the returned collection. - If the comparator is not set, keys or values of the collection should be comparable, not the collection itself. - The note about the transactional context is not related to the paragraphs above. It makes sense to convert it into a note. Credit goes to Andrey for spotting these problems on hazelcast/hazelcast-python-client#232
1 parent 237ae42 commit 5099dd5

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/docs/asciidoc/distributed_query.adoc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -413,8 +413,8 @@ predicate has a filter
413413
to retrieve the objects with an "age" greater than or equal to 18.
414414
* Then a `PagingPredicate` is constructed in which the page size is 5,
415415
so that there are five objects in each page.
416-
The first time the values are called creates the first page.
417-
* It gets subsequent pages with the `nextPage()`
416+
The first time the `values()` method is called, the first page is fetched.
417+
* Finally, the subsequent page is fetched by calling the `nextPage()`
418418
method of `PagingPredicate` and querying the map again with the
419419
updated `PagingPredicate`.
420420

@@ -434,8 +434,8 @@ values = map.values( pagingPredicate );
434434
----
435435

436436
If a comparator is not specified for `PagingPredicate`, but you want
437-
to get a collection of keys or values page by page, this collection must
438-
be an instance of `Comparable` (i.e., it must implement `java.lang.Comparable`).
437+
to get a collection of keys or values page by page, keys or values must
438+
be instances of `Comparable` (i.e., they must implement `java.lang.Comparable`).
439439
Otherwise, the `java.lang.IllegalArgument` exception is thrown.
440440

441441
You can also access a specific page more
@@ -445,7 +445,7 @@ once instead of reaching the hundredth page one by one using the `nextPage()` me
445445
Note that this feature tires the memory and see the
446446
link:{docBaseUrl}/javadoc/com/hazelcast/query/PagingPredicate.html[PagingPredicate Javadoc^].
447447

448-
Paging Predicate, also known as Order & Limit, is not supported in
448+
NOTE: Paging Predicate, also known as Order & Limit, is not supported in
449449
Transactional Context.
450450

451451
==== Filtering with Partition Predicate

0 commit comments

Comments
 (0)