Class CosmosPagedIterable<T>

Type Parameters:
T - The type of elements in a ContinuablePage
All Implemented Interfaces:
Iterable<T>

public final class CosmosPagedIterable<T> extends 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:
  • Constructor Details

    • CosmosPagedIterable

      public CosmosPagedIterable(CosmosPagedFlux<T> cosmosPagedFlux)
      Creates instance given CosmosPagedFlux.
      Parameters:
      cosmosPagedFlux - the paged flux use as iterable
    • CosmosPagedIterable

      public CosmosPagedIterable(CosmosPagedFlux<T> cosmosPagedFlux, int pageSize)
      Creates instance given CosmosPagedFlux.
      Parameters:
      cosmosPagedFlux - the paged flux use as iterable
      pageSize - the preferred pageSize to be used when pulling data from the service
    • CosmosPagedIterable

      public CosmosPagedIterable(CosmosPagedFlux<T> cosmosPagedFlux, int pageSize, int pagePrefetchCount)
      Creates instance given CosmosPagedFlux.
      Parameters:
      cosmosPagedFlux - the paged flux use as iterable
      pageSize - the preferred pageSize to be used when pulling data from the service
      pagePrefetchCount - 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

      public CosmosPagedIterable<T> handle(Consumer<FeedResponse<T>> feedResponseConsumer)
      Handle for invoking "side-effects" on each FeedResponse returned by CosmosPagedIterable
      Parameters:
      feedResponseConsumer - handler
      Returns:
      CosmosPagedIterable instance with attached handler