Class OffsetPaginator

java.lang.Object
org.apache.drill.exec.store.http.paginator.Paginator
org.apache.drill.exec.store.http.paginator.OffsetPaginator
All Implemented Interfaces:
Iterator<String>

public class OffsetPaginator extends Paginator
  • Constructor Details

    • OffsetPaginator

      public OffsetPaginator(okhttp3.HttpUrl.Builder builder, int limit, int pageSize, String limitParam, String offsetParam)
      This class implements the idea of an Offset Paginator. See here for complete explanation: https://nordicapis.com/everything-you-need-to-know-about-api-pagination/

      Parameters:
      builder - The okhttp3 URL builder which has the API root URL
      limit - The limit clause from the sql query
      pageSize - The page size from the API documentation. To minimize requests, it should be set to the max that the API allows.
      limitParam - The field name which corresponds to the limit field from the API
      offsetParam - The field name which corresponds to the offset field from the API
  • Method Details

    • hasNext

      public boolean hasNext()
    • next

      public String next()