public class StreamSpliterator extends Spliterators.AbstractSpliterator<ILogData>
This spliterator is guaranteed to never read PAST the maximum global address given. This is necessary because reading from a stream MODIFIES the stream pointer, and streams provide the guarantee that they will return entries in order exactly once.
Concurrent modification of the stream during iteration is NOT supported.
Created by mwei on 4/24/17.
Spliterator.OfDouble, Spliterator.OfInt, Spliterator.OfLong, Spliterator.OfPrimitive<T,T_CONS,T_SPLITR extends Spliterator.OfPrimitive<T,T_CONS,T_SPLITR>>
CONCURRENT, DISTINCT, IMMUTABLE, NONNULL, ORDERED, SIZED, SORTED, SUBSIZED
Constructor and Description |
---|
StreamSpliterator(IStreamView view)
Construct a stream spliterator with the given view and no limit.
|
StreamSpliterator(IStreamView view,
long maxGlobal)
Construct a stream spliterator with the given view and limit
|
Modifier and Type | Method and Description |
---|---|
Comparator<? super ILogData> |
getComparator() |
boolean |
tryAdvance(Consumer<? super ILogData> action) |
characteristics, estimateSize, trySplit
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining, getExactSizeIfKnown, hasCharacteristics
public StreamSpliterator(IStreamView view)
view
- The view to construct the spliterator with.public StreamSpliterator(IStreamView view, long maxGlobal)
view
- The view to construct the spliterator with.maxGlobal
- The maximum global address to limit reads up to.public Comparator<? super ILogData> getComparator()
Copyright © 2019 CorfuDB. All rights reserved.