Package com.azure.core.util.paging
Class ContinuablePagedIterable<C,T,P extends ContinuablePage<C,T>>
java.lang.Object
com.azure.core.util.IterableStream<T>
com.azure.core.util.paging.ContinuablePagedIterable<C,T,P>
- Type Parameters:
C- the type of the continuation tokenT- The type of elements in aContinuablePageP- TheContinuablePageholding items of typeT.
- All Implemented Interfaces:
Iterable<T>
- Direct Known Subclasses:
AnalyzeActionsResultPagedIterable,AnalyzeHealthcareEntitiesPagedIterable,BlobChangefeedPagedIterable,CosmosPagedIterable,PagedIterableBase
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionContinuablePagedIterable(ContinuablePagedFlux<C, T, P> pagedFlux) Creates instance with the givenContinuablePagedFlux.ContinuablePagedIterable(ContinuablePagedFlux<C, T, P> pagedFlux, int batchSize) Creates instance with the givenContinuablePagedFlux. -
Method Summary
Modifier and TypeMethodDescriptionRetrieve theIterable, one page at a time.iterableByPage(int preferredPageSize) Retrieve theIterable, one page at a time, with each page containingpreferredPageSizeitems.iterableByPage(C continuationToken) Retrieve theIterable, one page at a time, starting from the next page associated with the given continuation token.iterableByPage(C continuationToken, int preferredPageSize) Retrieve theIterable, one page at a time, with each page containingpreferredPageSizeitems, starting from the next page associated with the given continuation token.iterator()Utility function to provideIteratorof valueT.stream()Utility function to provideStreamof valueT.Retrieve theStream, one page at a time.streamByPage(int preferredPageSize) Retrieve theStream, one page at a time, with each page containingpreferredPageSizeitems.streamByPage(C continuationToken) Retrieve theStream, one page at a time, starting from the next page associated with the given continuation token.streamByPage(C continuationToken, int preferredPageSize) Retrieve theStream, one page at a time, with each page containingpreferredPageSizeitems, starting from the next page associated with the given continuation token.Methods inherited from class com.azure.core.util.IterableStream
ofMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
ContinuablePagedIterable
Creates instance with the givenContinuablePagedFlux.- Parameters:
pagedFlux- the paged flux use as iterable
-
ContinuablePagedIterable
Creates instance with the givenContinuablePagedFlux.- Parameters:
pagedFlux- the paged flux use as iterablebatchSize- the bounded capacity to prefetch from theContinuablePagedFlux
-
-
Method Details
-
stream
Description copied from class:IterableStreamUtility function to provideStreamof valueT.- Overrides:
streamin classIterableStream<T>- Returns:
Streamof valueT.
-
streamByPage
Retrieve theStream, one page at a time. It will provide sameStreamof T values from starting if called multiple times.- Returns:
Streamof a pages
-
streamByPage
Retrieve theStream, one page at a time, starting from the next page associated with the given continuation token. To start from first page, usestreamByPage()instead.- Parameters:
continuationToken- The continuation token used to fetch the next page- Returns:
Streamof a pages
-
streamByPage
Retrieve theStream, one page at a time, with each page containingpreferredPageSizeitems. It will provide sameStreamof T values from starting if called multiple times.- Parameters:
preferredPageSize- the preferred page size, service may or may not honor the page size preference hence client MUST be prepared to handle pages with different page size.- Returns:
Streamof a pages
-
streamByPage
Retrieve theStream, one page at a time, with each page containingpreferredPageSizeitems, starting from the next page associated with the given continuation token. To start from first page, usestreamByPage()orstreamByPage(int)instead.- Parameters:
preferredPageSize- the preferred page size, service may or may not honor the page size preference hence client MUST be prepared to handle pages with different page size.continuationToken- The continuation token used to fetch the next page- Returns:
Streamof a pages
-
iterator
Description copied from class:IterableStreamUtility function to provideIteratorof valueT. -
iterableByPage
Retrieve theIterable, one page at a time. It will provide sameIterableof T values from starting if called multiple times.- Returns:
Streamof a pages
-
iterableByPage
Retrieve theIterable, one page at a time, starting from the next page associated with the given continuation token. To start from first page, useiterableByPage()instead.- Parameters:
continuationToken- The continuation token used to fetch the next page- Returns:
Iterableof a pages
-
iterableByPage
Retrieve theIterable, one page at a time, with each page containingpreferredPageSizeitems. It will provide sameIterableof T values from starting if called multiple times.- Parameters:
preferredPageSize- the preferred page size, service may or may not honor the page size preference hence client MUST be prepared to handle pages with different page size.- Returns:
Iterableof a pages
-
iterableByPage
Retrieve theIterable, one page at a time, with each page containingpreferredPageSizeitems, starting from the next page associated with the given continuation token. To start from first page, useiterableByPage()oriterableByPage(int)instead.- Parameters:
preferredPageSize- the preferred page size, service may or may not honor the page size preference hence client MUST be prepared to handle pages with different page size.continuationToken- The continuation token used to fetch the next page- Returns:
Iterableof a pages
-