Interface PaginationServiceInternal
- All Superinterfaces:
PaginationService
- All Known Implementing Classes:
PaginationServiceImpl
Additional pagination functionality dealing with PagingIterators / Paginated live here
Until CONFDEV-26743 is resolved and we have a blessed path going forward, the PagingIterator / Paginated types
should not be leaked to consumers.
-
Method Summary
Modifier and TypeMethodDescription<F,
T> Paginated<T> newPaginated
(PaginationBatch<F> fetchBatch, Function<Iterable<F>, Iterable<T>> modelConverter, int maxLimit) Constructs a Paginated implementation backed by the given PaginationBatch.<F,
T> PagingIterator<T> newPagingIterator
(PaginationBatch<F> fetchBatch, int resultsPerPage, Function<Iterable<F>, Iterable<T>> modelConverter) Constructs a PagingIterator backed by the given PaginationBatch.Methods inherited from interface com.atlassian.confluence.api.service.pagination.PaginationService
performPaginationListRequest, performPaginationListRequestWithCursor, performPaginationRequest
-
Method Details
-
newPagingIterator
<F,T> PagingIterator<T> newPagingIterator(PaginationBatch<F> fetchBatch, int resultsPerPage, Function<Iterable<F>, Iterable<T>> modelConverter) Constructs a PagingIterator backed by the given PaginationBatch. The Iterator is guaranteed to yield all results provided by the PaginationBatch. No more than resultsPerPage are fetched from the PaginationBatch at one time, and each batch of data is only kept live for the time it takes callers to iterate through it.- Parameters:
fetchBatch
- - a request for a range of dataresultsPerPage
- - number of results to request from PaginationBatch each invocation.modelConverter
- - a function to convert from the supplied object to a model object, this will be executed within a transaction.- Returns:
- a PagingIterator of model objects, with results that the user is allowed to see.
- Since:
- 7.0.1
- See Also:
-
newPaginated
<F,T> Paginated<T> newPaginated(PaginationBatch<F> fetchBatch, Function<Iterable<F>, Iterable<T>> modelConverter, int maxLimit) Constructs a Paginated implementation backed by the given PaginationBatch.- Parameters:
fetchBatch
- - a request for a range of datamodelConverter
- - a function to convert from the supplied object to a model object, this will be executed within a transaction.maxLimit
- - the max limit to apply when creating LimitedRequests for paged requests from the Paginated.- Since:
- 7.0.1
- See Also:
-