Class BroadleafScopedPagingStreams.ChunkFetchSpliterator<T>
java.lang.Object
com.broadleafcommerce.sandbox.stream.BroadleafScopedPagingStreams.ChunkFetchSpliterator<T>
- Type Parameters:
T-
- All Implemented Interfaces:
Spliterator<T>
- Enclosing class:
- BroadleafScopedPagingStreams
public static final class BroadleafScopedPagingStreams.ChunkFetchSpliterator<T>
extends Object
implements Spliterator<T>
A
Spliterator capable of iterating through a partitioned list of identifying values
and producing resulting, streamable data based on each partition. As the results from each
chunk are depleted, the algorithm advances to the next chunk to replenish available results
to expose via tryAdvance(Consumer).-
Nested Class Summary
Nested classes/interfaces inherited from interface java.util.Spliterator
Spliterator.OfDouble, Spliterator.OfInt, Spliterator.OfLong, Spliterator.OfPrimitive<T extends Object,T_CONS extends Object, T_SPLITR extends Spliterator.OfPrimitive<T, T_CONS, T_SPLITR>> -
Field Summary
Fields inherited from interface java.util.Spliterator
CONCURRENT, DISTINCT, IMMUTABLE, NONNULL, ORDERED, SIZED, SORTED, SUBSIZED -
Constructor Summary
ConstructorsConstructorDescriptionChunkFetchSpliterator(List<List<String>> chunks, ScopedListSource<T> source) -
Method Summary
Modifier and TypeMethodDescriptionintlongbooleantryAdvance(Consumer<? super T> action) trySplit()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Spliterator
forEachRemaining, getComparator, getExactSizeIfKnown, hasCharacteristics
-
Constructor Details
-
ChunkFetchSpliterator
-
-
Method Details
-
tryAdvance
- Specified by:
tryAdvancein interfaceSpliterator<T>
-
trySplit
- Specified by:
trySplitin interfaceSpliterator<T>
-
estimateSize
public long estimateSize()- Specified by:
estimateSizein interfaceSpliterator<T>
-
characteristics
public int characteristics()- Specified by:
characteristicsin interfaceSpliterator<T>
-