Interface LimitedRequest

  • All Known Subinterfaces:
    SkipDiscardLimitedRequest
    All Known Implementing Classes:
    LimitedRequestImpl

    @ExperimentalApi
    public interface LimitedRequest
    A PageRequest guaranteed to have a limit capped to a developer provided value rather than a user provided value. getLimit is restricted to the minimum of getMaxLimit and the user provided value. Does not support requesting unlimited result sets.
    • Method Detail

      • getStart

        int getStart()
        Returns:
        zero-based start index for the page of results (first result is 0)
      • getLimit

        int getLimit()
        Returns:
        the maximum results to fetch to attempt to fulfil the request
      • getMaxLimit

        int getMaxLimit()
        Returns:
        the maximum limit for this request
      • getNeeded

        @Deprecated
        int getNeeded()
        Deprecated.
        since 5.7.2. No longer used.
        Returns:
        the number of results needed to return to fulfill this request, may exceed getLimit
      • getCursor

        default Cursor getCursor()
        Returns:
        the identifier which is used to skip results from a previous query when paginating.
        Since:
        7.18