Class OffsetPaginator
java.lang.Object
org.apache.drill.exec.store.http.paginator.Paginator
org.apache.drill.exec.store.http.paginator.OffsetPaginator
-
Field Summary
Fields inherited from class org.apache.drill.exec.store.http.paginator.Paginator
builder, MODE, pageSize, partialPageReceived
-
Constructor Summary
ConstructorDescriptionOffsetPaginator
(okhttp3.HttpUrl.Builder builder, int limit, int pageSize, String limitParam, String offsetParam) This class implements the idea of an Offset Paginator. -
Method Summary
Methods inherited from class org.apache.drill.exec.store.http.paginator.Paginator
getMode, getPageSize, notifyPartialPage, setBuilder
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Iterator
forEachRemaining, remove
-
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 URLlimit
- The limit clause from the sql querypageSize
- 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 APIoffsetParam
- The field name which corresponds to the offset field from the API
-
-
Method Details
-
hasNext
public boolean hasNext() -
next
-