C - connection type expected to handle the operations.T - the type of the returned pages.public interface PagingProvider<C,T> extends Closeable
Instances should not be reused. Each execution of a paging operation should return different instances.
Implementing this interface does not guarantee thread safeness.
| Modifier and Type | Method and Description |
|---|---|
List<T> |
getPage(C connection)
Returns the next page of items.
|
Optional<Integer> |
getTotalResults(C connection)
returns the total amount of items in the non-paged result set.
|
default boolean |
useStickyConnections()
Some systems require the same connection that obtained the first page to be used to fetch
the subsequent ones.
|
List<T> getPage(C connection)
List then it means no more items are availableOptional<Integer> getTotalResults(C connection)
Optional.empty() value is returned.connection - The connection to be used to do the query.default boolean useStickyConnections()
getPage(Object) method.
Keep in mind that if the operation is participating in a transaction, then the connection will become sticky no matter what this method says.
This method is optional and defaults to false
Copyright © 2017 MuleSoft, Inc.. All rights reserved.