Package com.atlassian.jira.util
Interface StreamPageRequests
- All Known Implementing Classes:
StreamPageRequestsImpl
@PublicApi
public interface StreamPageRequests
Interface containing factory methods used to create
StreamPageRequest instances.- Since:
- 10.7.1
-
Method Summary
Modifier and TypeMethodDescriptionlimit(StreamPageRequest pageRequest, int maxSize) Takes a page request and if itslimitis greater thanmaxSizethen returns a new page request withlimitequal tomaxSize.Creates an instance ofStreamPageRequest.
-
Method Details
-
request
Creates an instance ofStreamPageRequest.cursor is the value of the last element in the previous page, or null if this is the first page.
- Parameters:
cursor- the value of the last element in the previous page, or null if this is the first pagelimit- maximum number of results on a page, will be set toStreamPageRequest.MAX_PAGE_LIMITifnull- Returns:
- a page request object
-
limit
Takes a page request and if itslimitis greater thanmaxSizethen returns a new page request withlimitequal tomaxSize. Otherwise the same page request is returned.- Parameters:
pageRequest- original page requestmaxSize- maximum limit in page request- Returns:
- page request with limit no greater than maxSize
-