Package com.cognite.client.servicesV1
Class ConnectorServiceV1.ResultFutureIterator<T>
- java.lang.Object
-
- com.cognite.client.servicesV1.ConnectorServiceV1.ResultFutureIterator<T>
-
- Type Parameters:
T
-
- All Implemented Interfaces:
Serializable
,Iterator<CompletableFuture<ResponseItems<T>>>
- Enclosing class:
- ConnectorServiceV1
public abstract static class ConnectorServiceV1.ResultFutureIterator<T> extends Object implements Iterator<CompletableFuture<ResponseItems<T>>>
Iterator for paging through requests based on response cursors. This iterator is based on async request, and will return aCompletableFuture
on eachnext()
call. However,hasNext()
needs to wait for the current request to complete before being able to evaluate if it carries a cursor to the next page.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ResultFutureIterator()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
hasNext()
CompletableFuture<ResponseItems<T>>
next()
static <T> ConnectorServiceV1.ResultFutureIterator<T>
of(CogniteClient client, RequestProvider requestProvider, ResponseParser<T> responseParser)
-
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
-
-
-
-
Method Detail
-
of
public static <T> ConnectorServiceV1.ResultFutureIterator<T> of(CogniteClient client, RequestProvider requestProvider, ResponseParser<T> responseParser)
-
next
public CompletableFuture<ResponseItems<T>> next() throws NoSuchElementException
- Specified by:
next
in interfaceIterator<T>
- Throws:
NoSuchElementException
-
-