Package com.datastax.astra.client.model
Class PageableIterable<T>
java.lang.Object
com.datastax.astra.client.model.PageableIterable<T>
- Type Parameters:
T
- type of the document used in the associated collection.
- All Implemented Interfaces:
Closeable
,AutoCloseable
- Direct Known Subclasses:
DistinctIterable
,FindIterable
Helping Iteration on Pages and Documents for DataApi.
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
The iterable is active and progressing on the results.protected Collection
<T> Reference to the collection in use.The current page in use.protected int
Number of items still available to retrieve in this page.protected boolean
the Iterator is exhaustedprotected Filter
Original command, we will edit it to iterate on pages.protected FindOptions
Original command, we will edit it to iterate on pages.protected final AtomicInteger
Check host many has been processed (skip and limit support) -
Constructor Summary
-
Method Summary
-
Field Details
-
collection
Reference to the collection in use. -
totalItemProcessed
Check host many has been processed (skip and limit support) -
active
protected boolean activeThe iterable is active and progressing on the results. -
exhausted
protected boolean exhaustedthe Iterator is exhausted -
currentPage
The current page in use. -
currentPageAvailable
protected int currentPageAvailableNumber of items still available to retrieve in this page. -
filter
Original command, we will edit it to iterate on pages. -
options
Original command, we will edit it to iterate on pages.
-
-
Constructor Details
-
PageableIterable
protected PageableIterable()Default constructor.
-
-
Method Details
-
fetchNextPage
public boolean fetchNextPage()Fetch the next page if the result.- Returns:
- if a new page has been found.
-
getSortVector
Get current page sort Vector When available.- Returns:
- sortVector if asked in previous request and iterator is still active.
-
close
public void close()When no more items available.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-