Class EagerPaginator<Resp,T>
java.lang.Object
io.temporal.internal.client.EagerPaginator<Resp,T>
- All Implemented Interfaces:
Iterator<T>
- Direct Known Subclasses:
ListScheduleListDescriptionIterator
The main goal for this Iterator implementation is to abstract the functionality of "eager
pagination". This implementation requests the next page when we start iterating through the
previous page. The main goal of this approach is to reduce a synchronous wait that would
otherwise happen when a first element of the next page is requested.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract com.google.protobuf.ByteStringgetNextPageToken(Resp response) booleanhasNext()voidinit()next()protected abstract CompletableFuture<Resp> performRequest(com.google.protobuf.ByteString nextPageToken) toElements(Resp response) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining, remove
-
Constructor Details
-
EagerPaginator
public EagerPaginator()
-
-
Method Details
-
hasNext
-
next
-
init
public void init() -
performRequest
protected abstract CompletableFuture<Resp> performRequest(@Nonnull com.google.protobuf.ByteString nextPageToken) -
getNextPageToken
-
toElements
-