Package io.atomix.client.iterator
Interface AsyncIterator<T>
public interface AsyncIterator<T>
Asynchronous iterator.
-
Method Details
-
hasNext
CompletableFuture<Boolean> hasNext()Returns whether the iterator has a next item.- Returns:
- whether a next item exists in the iterator
-
next
CompletableFuture<T> next()Returns the next item in the iterator.- Returns:
- the next item in the iterator
-
close
CompletableFuture<Void> close()Closes the iterator.- Returns:
- a future to be completed once the iterator has been closed
-
sync
Returns a synchronous iterator.- Returns:
- the synchronous iterator
-
sync
Returns a synchronous iterator.- Parameters:
timeout- the iterator operation timeout- Returns:
- the synchronous iterator
-