Class HeaderIndexPaginator

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

public class HeaderIndexPaginator extends Paginator
The Header Index Paginator is used when the API in question send a link in the HTTP header containing the URL for the next page.
  • Constructor Details

    • HeaderIndexPaginator

      public HeaderIndexPaginator(okhttp3.HttpUrl.Builder builder, int pageSize, int limit, String nextPageParam, String firstPageURL)
  • Method Details

    • hasNext

      public boolean hasNext()
    • setResponseHeaders

      public void setResponseHeaders(okhttp3.Headers headers)
      This method sets the headers for the Header Index Paginator. This must be called with updated headers before the next() method is called.
      Parameters:
      headers - A Headers object containing the response headers from the previous API call.
    • next

      public String next()