Package org.springframework.data.support
Class ReactivePageableExecutionUtils
java.lang.Object
org.springframework.data.support.ReactivePageableExecutionUtils
Support for query execution using
Pageable
. Using ReactivePageableExecutionUtils
assumes that data
queries are cheaper than COUNT
queries and so some cases can take advantage of optimizations.- Since:
- 3.5
- Author:
- Mark Paluch
-
Method Summary
-
Method Details
-
getPage
public static <T> reactor.core.publisher.Mono<Page<T>> getPage(List<T> content, Pageable pageable, reactor.core.publisher.Mono<Long> totalSupplier) Constructs aPage
based on the givencontent
,Pageable
andMono
applying optimizations. The construction ofPage
omits a count query if the total can be determined based on the result size andPageable
.- Parameters:
content
- must not be null.pageable
- must not be null.totalSupplier
- must not be null.- Returns:
- the
Page
.
-