Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

Iteration over all pages in a collection #73

Merged

Conversation

Matthimatiker
Copy link
Collaborator

Introduced a stream() method that allows to iterate over all pages of a collection.
The pagination is performed automatically in the background, only required pages are fetched via API call.

Additionally, the performance of paging has been improved in general (fixes #72).

The new stream() method is provided by the class IterableObjectPagination. All collections have been updated to inherit from that class.
The previous base class JsonArrayPagination still exists and its behavior was not changed, so this pull request should be completely backward compatible.

…(there seems to be some kind of interference between objects)
…*all* pages are crawled or if the collection stops in the middle
…each other (as the state of the pagination changes)
…ed with @BeforeMethod it is executed before *every* test
…re is a next page via hasNext(), avoid an additional HTTP request whenever possible
@Matthimatiker
Copy link
Collaborator Author

Remarks from latest Review have been addressed. Can be merged.

@Matthimatiker Matthimatiker merged commit 6bd19fe into cloud-of-things:develop Jul 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JsonArray pagination is not efficient
1 participant