public class TypeConverterStream extends AbstractDelegatingCacheStream
CacheStream.SegmentCompletionListener
Stream.Builder<T>
underlyingStream
Constructor and Description |
---|
TypeConverterStream(CacheStream<?> stream,
TypeConverter<Object,Object,Object,Object> converter,
InternalEntryFactory entryFactory) |
Modifier and Type | Method and Description |
---|---|
Iterator<Object> |
iterator() |
Spliterator<Object> |
spliterator() |
allMatch, anyMatch, close, collect, collect, count, disableRehashAware, distinct, distributedBatchSize, filter, filterKeys, filterKeySegments, findAny, findFirst, flatMap, flatMapToDouble, flatMapToInt, flatMapToLong, forEach, forEachOrdered, isParallel, limit, map, mapToDouble, mapToInt, mapToLong, max, min, noneMatch, onClose, parallel, parallelDistribution, peek, reduce, reduce, reduce, segmentCompletionListener, sequential, sequentialDistribution, skip, sorted, sorted, timeout, toArray, toArray, unordered
public TypeConverterStream(CacheStream<?> stream, TypeConverter<Object,Object,Object,Object> converter, InternalEntryFactory entryFactory)
public Iterator<Object> iterator()
CacheStream
Usage of this operator requires closing this stream after you are done with the iterator. The preferred usage is to use a try with resource block on the stream.
This method has special usage with the CacheStream.SegmentCompletionListener
in
that as entries are retrieved from the next method it will complete segments.
This method obeys the CacheStream.distributedBatchSize(int)
. Note that when using methods such as
Stream.flatMap(Function)
that you will have possibly more than 1 element mapped to a given key
so this doesn't guarantee that many number of entries are returned per batch.
Note that the Iterator.remove()
method is only supported if no intermediate operations have been
applied to the stream and this is not a stream created from a Cache.values()
collection.
iterator
in interface BaseStream
iterator
in interface CacheStream
iterator
in class AbstractDelegatingCacheStream
public Spliterator<Object> spliterator()
CacheStream
Usage of this operator requires closing this stream after you are done with the spliterator. The preferred usage is to use a try with resource block on the stream.
spliterator
in interface BaseStream
spliterator
in interface CacheStream
spliterator
in class AbstractDelegatingCacheStream
Copyright © 2018 JBoss, a division of Red Hat. All rights reserved.