T
- The modelled type of the object in a page.public interface PagePublisher<T> extends SdkPublisher<Page<T>>
You can either subscribe to the Page
s or flattened items across all pages via items()
.
Example:
1) Subscribing to Page
s
PagePublisher<MyItem> publisher = mappedTable.scan();
publisher.subscribe(page -> page.items().forEach(item -> System.out.println(item)));
2) Subscribing to items across all pages.
PagePublisher<<MyItem> publisher = mappedTable.scan();
publisher.items().subscribe(item -> System.out.println(item));
Modifier and Type | Method and Description |
---|---|
static <T> PagePublisher<T> |
create(SdkPublisher<Page<T>> publisher)
Creates a flattened items publisher with the underlying page publisher.
|
default SdkPublisher<T> |
items()
Returns a publisher that can be used to request a stream of items across all pages.
|
adapt, buffer, filter, filter, flatMapIterable, limit, map, subscribe
static <T> PagePublisher<T> create(SdkPublisher<Page<T>> publisher)
default SdkPublisher<T> items()
This method is useful if you are interested in subscribing the items in the response pages instead of the top level pages.
Copyright © 2021. All rights reserved.