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 Type
    Method
    Description
    limit(StreamPageRequest pageRequest, int maxSize)
    Takes a page request and if its limit is greater than maxSize then returns a new page request with limit equal to maxSize.
    request(String cursor, Integer limit)
    Creates an instance of StreamPageRequest.
  • Method Details

    • request

      StreamPageRequest request(@Nullable String cursor, @Nullable Integer limit)
      Creates an instance of StreamPageRequest.

      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 page
      limit - maximum number of results on a page, will be set to StreamPageRequest.MAX_PAGE_LIMIT if null
      Returns:
      a page request object
    • limit

      StreamPageRequest limit(StreamPageRequest pageRequest, int maxSize)
      Takes a page request and if its limit is greater than maxSize then returns a new page request with limit equal to maxSize. Otherwise the same page request is returned.
      Parameters:
      pageRequest - original page request
      maxSize - maximum limit in page request
      Returns:
      page request with limit no greater than maxSize