ContinuablePagedIterable<C,T,P> Class
- java.
lang. Object - com.
azure. core. util. IterableStream<T> - com.
azure. core. util. paging. ContinuablePagedIterable<C,T,P>
- com.
- com.
Type Parameters
- C
the type of the continuation token
- T
The type of elements in a ContinuablePage
- P
The ContinuablePage holding items of type
T
.
public class ContinuablePagedIterable<C,T,P>
extends IterableStream<T>
This class provides utility to iterate over ContinuablePage<C,T> using Stream Iterable interfaces.
Constructor Summary
Constructor | Description |
---|---|
ContinuablePagedIterable(ContinuablePagedFlux<C,T,P> pagedFlux) |
Creates instance with the given ContinuablePagedFlux<C,T,P>. |
ContinuablePagedIterable(ContinuablePagedFlux<C,T,P> pagedFlux, int batchSize) |
Creates instance with the given ContinuablePagedFlux<C,T,P>. |
ContinuablePagedIterable(Supplier<PageRetrieverSync<C,P>> pageRetrieverSyncProvider, Integer pageSize, Predicate<C> continuationPredicate) |
Creates instance with the given PageRetrieverSync<C,P>. |
Method Summary
Modifier and Type | Method and Description |
---|---|
Iterable<P> |
iterableByPage()
Retrieve the Iterable, one page at a time. |
Iterable<P> |
iterableByPage(C continuationToken)
Retrieve the Iterable, one page at a time, starting from the next page associated with the given continuation token. |
Iterable<P> |
iterableByPage(C continuationToken, int preferredPageSize)
Retrieve the Iterable, one page at a time, with each page containing |
Iterable<P> |
iterableByPage(int preferredPageSize)
Retrieve the Iterable, one page at a time, with each page containing |
Iterator<T> |
iterator()
Utility function to provide Iterator of value |
Stream<T> |
stream()
Utility function to provide Stream of value |
Stream<P> |
streamByPage()
Retrieve the Stream, one page at a time. |
Stream<P> |
streamByPage(C continuationToken)
Retrieve the Stream, one page at a time, starting from the next page associated with the given continuation token. |
Stream<P> |
streamByPage(C continuationToken, int preferredPageSize)
Retrieve the Stream, one page at a time, with each page containing |
Stream<P> |
streamByPage(int preferredPageSize)
Retrieve the Stream, one page at a time, with each page containing |
Methods inherited from IterableStream
Methods inherited from java.lang.Object
Constructor Details
ContinuablePagedIterable
public ContinuablePagedIterable(ContinuablePagedFlux
Creates instance with the given ContinuablePagedFlux<C,T,P>.
Parameters:
ContinuablePagedIterable
public ContinuablePagedIterable(ContinuablePagedFlux
Creates instance with the given ContinuablePagedFlux<C,T,P>.
Parameters:
ContinuablePagedIterable
public ContinuablePagedIterable(Supplier
Creates instance with the given PageRetrieverSync<C,P>.
Parameters:
Method Details
iterableByPage
public Iterable
iterableByPage()
Retrieve the Iterable, one page at a time. It will provide same Iterable of T values from starting if called multiple times.
Returns:
iterableByPage
public Iterable
iterableByPage(C continuationToken)
Retrieve the Iterable, one page at a time, starting from the next page associated with the given continuation token. To start from first page, use iterableByPage() instead.
Parameters:
Returns:
iterableByPage
public Iterable
iterableByPage(C continuationToken, int preferredPageSize)
Retrieve the Iterable, one page at a time, with each page containing preferredPageSize
items, starting from the next page associated with the given continuation token. To start from first page, use iterableByPage() or iterableByPage(int preferredPageSize) instead.
Parameters:
Returns:
iterableByPage
public Iterable
iterableByPage(int preferredPageSize)
Retrieve the Iterable, one page at a time, with each page containing preferredPageSize
items.
It will provide same Iterable of T values from starting if called multiple times.
Parameters:
Returns:
iterator
public Iterator
Utility function to provide Iterator of value T
.
Overrides:
ContinuablePagedIterable<C,T,P>.iterator()stream
public Stream
Utility function to provide Stream of value T
.
Overrides:
ContinuablePagedIterable<C,T,P>.stream()streamByPage
public Stream
streamByPage()
Retrieve the Stream, one page at a time. It will provide same Stream of T values from starting if called multiple times.
Returns:
streamByPage
public Stream
streamByPage(C continuationToken)
Retrieve the Stream, one page at a time, starting from the next page associated with the given continuation token. To start from first page, use streamByPage() instead.
Parameters:
Returns:
streamByPage
public Stream
streamByPage(C continuationToken, int preferredPageSize)
Retrieve the Stream, one page at a time, with each page containing preferredPageSize
items, starting from the next page associated with the given continuation token. To start from first page, use streamByPage() or streamByPage(int preferredPageSize) instead.
Parameters:
Returns:
streamByPage
public Stream
streamByPage(int preferredPageSize)
Retrieve the Stream, one page at a time, with each page containing preferredPageSize
items.
It will provide same Stream of T values from starting if called multiple times.
Parameters:
Returns:
Applies to
Azure SDK for Java