C
- the type of the continuation tokenT
- The type of elements in a ContinuablePage
P
- The ContinuablePage
holding items of type T
.public abstract class ContinuablePagedIterable<C,T,P extends ContinuablePage<C,T>> extends IterableStream<T>
IterableStream
,
ContinuablePagedFlux
Constructor and Description |
---|
ContinuablePagedIterable(ContinuablePagedFlux<C,T,P> pagedFlux)
Creates instance with the given
ContinuablePagedFlux . |
ContinuablePagedIterable(ContinuablePagedFlux<C,T,P> pagedFlux,
int batchSize)
Creates instance with the given
ContinuablePagedFlux . |
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 preferredPageSize items,
starting from the next page associated with the given continuation token. |
Iterable<P> |
iterableByPage(int preferredPageSize)
Retrieve the
Iterable , one page at a time, with each page containing preferredPageSize items. |
Iterator<T> |
iterator()
Utility function to provide
Iterator of value T . |
Stream<T> |
stream()
Utility function to provide
Stream of value T . |
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 preferredPageSize items,
starting from the next page associated with the given continuation token. |
Stream<P> |
streamByPage(int preferredPageSize)
Retrieve the
Stream , one page at a time, with each page containing preferredPageSize items. |
of
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public ContinuablePagedIterable(ContinuablePagedFlux<C,T,P> pagedFlux)
ContinuablePagedFlux
.pagedFlux
- the paged flux use as iterablepublic ContinuablePagedIterable(ContinuablePagedFlux<C,T,P> pagedFlux, int batchSize)
ContinuablePagedFlux
.pagedFlux
- the paged flux use as iterablebatchSize
- the bounded capacity to prefetch from the ContinuablePagedFlux
public Stream<T> stream()
IterableStream
Stream
of value T
.stream
in class IterableStream<T>
Stream
of value T
.public Stream<P> streamByPage()
Stream
, one page at a time. It will provide same Stream
of T values from starting if
called multiple times.Stream
of a pagespublic Stream<P> streamByPage(C continuationToken)
Stream
, one page at a time, starting from the next page associated with the given
continuation token. To start from first page, use ContinuablePagedIterable.streamByPage()
instead.continuationToken
- The continuation token used to fetch the next pageStream
of a pagespublic Stream<P> streamByPage(int preferredPageSize)
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.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.Stream
of a pagespublic Stream<P> streamByPage(C continuationToken, int preferredPageSize)
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 ContinuablePagedIterable.streamByPage()
or ContinuablePagedIterable.streamByPage(int)
instead.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 pageStream
of a pagespublic Iterator<T> iterator()
IterableStream
Iterator
of value T
.public Iterable<P> iterableByPage()
Iterable
, one page at a time. It will provide same Iterable
of T values from
starting if called multiple times.Stream
of a pagespublic Iterable<P> iterableByPage(C continuationToken)
Iterable
, one page at a time, starting from the next page associated with the given
continuation token. To start from first page, use ContinuablePagedIterable.iterableByPage()
instead.continuationToken
- The continuation token used to fetch the next pageIterable
of a pagespublic Iterable<P> iterableByPage(int preferredPageSize)
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.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.Iterable
of a pagespublic Iterable<P> iterableByPage(C continuationToken, int preferredPageSize)
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 ContinuablePagedIterable.iterableByPage()
or ContinuablePagedIterable.iterableByPage(int)
instead.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 pageIterable
of a pagesCopyright © 2021 Microsoft Corporation. All rights reserved.