@API(status=INTERNAL) public class CursorBasedPaginatedService<T> extends PaginatedService
chunkSize, DEFAULT_PAGINATION_CHUNK_SIZE, DEFAULT_PAGINATION_TOTAL_SIZE, maxSize
Constructor and Description |
---|
CursorBasedPaginatedService(CursorBasedPaginatedApi<T> paginatedApi,
java.lang.Integer chunkSize,
java.lang.Integer maxSize) |
Modifier and Type | Method and Description |
---|---|
java.util.stream.Stream<T> |
stream()
Returns an stream of elements with lazy fetching.
|
public CursorBasedPaginatedService(CursorBasedPaginatedApi<T> paginatedApi, java.lang.Integer chunkSize, java.lang.Integer maxSize)
paginatedApi
- the paginated api to be calledchunkSize
- the max number of items to be retrieved in one callmaxSize
- the total max number of items to be retrievedpublic java.util.stream.Stream<T> stream()
Stream
which lazily makes calls to the paginatedApi
.