Package com.azure.cosmos.util
Class CosmosPagedIterable<T>
java.lang.Object
com.azure.core.util.IterableStream<T>
com.azure.core.util.paging.ContinuablePagedIterable<String,T,FeedResponse<T>>
com.azure.cosmos.util.CosmosPagedIterable<T>
- Type Parameters:
T
- The type of elements in aContinuablePage
- All Implemented Interfaces:
Iterable<T>
public final class CosmosPagedIterable<T>
extends com.azure.core.util.paging.ContinuablePagedIterable<String,T,FeedResponse<T>>
Cosmos implementation of
ContinuablePagedIterable
.
This type is a IterableStream
that provides the ability to operate on pages of type
FeedResponse
and individual items in such pages. This type supports String
type continuation tokens,
allowing for restarting from a previously-retrieved continuation token.
For more information on the base type, refer ContinuablePagedIterable
- See Also:
-
ContinuablePage
FeedResponse
-
Constructor Summary
ConstructorDescriptionCosmosPagedIterable
(CosmosPagedFlux<T> cosmosPagedFlux) Creates instance givenCosmosPagedFlux
.CosmosPagedIterable
(CosmosPagedFlux<T> cosmosPagedFlux, int pageSize) Creates instance givenCosmosPagedFlux
.CosmosPagedIterable
(CosmosPagedFlux<T> cosmosPagedFlux, int pageSize, int pagePrefetchCount) Creates instance givenCosmosPagedFlux
. -
Method Summary
Modifier and TypeMethodDescriptionhandle
(Consumer<FeedResponse<T>> feedResponseConsumer) Handle for invoking "side-effects" on each FeedResponse returned by CosmosPagedIterableMethods inherited from class com.azure.core.util.paging.ContinuablePagedIterable
iterableByPage, iterableByPage, iterableByPage, iterableByPage, iterator, stream, streamByPage, streamByPage, streamByPage, streamByPage
Methods inherited from class com.azure.core.util.IterableStream
of
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
CosmosPagedIterable
Creates instance givenCosmosPagedFlux
.- Parameters:
cosmosPagedFlux
- the paged flux use as iterable
-
CosmosPagedIterable
Creates instance givenCosmosPagedFlux
.- Parameters:
cosmosPagedFlux
- the paged flux use as iterablepageSize
- the preferred pageSize to be used when pulling data from the service
-
CosmosPagedIterable
Creates instance givenCosmosPagedFlux
.- Parameters:
cosmosPagedFlux
- the paged flux use as iterablepageSize
- the preferred pageSize to be used when pulling data from the servicepagePrefetchCount
- the number of pages prefetched from the paged flux - note that this might be interpolated by Reactor - for example all numbers > 1 but < 8 will result in at least prefetching 8 pages. See `reactor.util.concurrent.Queues.get(int)` for more details
-
-
Method Details
-
handle
Handle for invoking "side-effects" on each FeedResponse returned by CosmosPagedIterable- Parameters:
feedResponseConsumer
- handler- Returns:
- CosmosPagedIterable instance with attached handler
-