Class BroadleafScopedPagingStreams

java.lang.Object
com.broadleafcommerce.sandbox.stream.BroadleafScopedPagingStreams

public final class BroadleafScopedPagingStreams extends Object
Produce a stream of data objects based on a list of identifying values. The identifying values drive ScopedListSource and are exposed to that source in chunks to facilitate paged fetch. Paged fetching is transparent to the stream consumption and the stream may be consumed normally, one member at a time. Note, the resulting stream does not support parallel processing.

This type of paging stream is especially useful when you are mutating and persisting the stream members while processing the stream. Since the stream scope is predetermined, you don't have to worry about entity factor changes that would otherwise impact fetch and count results during more traditional paging approaches.
Author:
Jeff Fischer