public class DistributedLongCacheStream extends AbstractCacheStream<Long,LongStream,LongConsumer> implements LongStream
LongStream
that utilizes a lazily evaluated distributed back end execution. Note this
class is only able to be created using Stream.mapToInt(ToIntFunction)
or similar
methods from the CacheStream
interface.LongStream.Builder
closeRunnable, csm, distinct, distributedBatchSize, dm, executor, includeLoader, intermediateOperations, intermediateType, iteratorOperation, keyEquivalence, keysToFilter, localAddress, localIntermediateOperations, log, parallel, parallelDistribution, partition, registry, rehashAware, segmentCompletionListener, segmentsToFilter, sorted, supplier, timeout, timeoutUnit
Modifier | Constructor and Description |
---|---|
protected |
DistributedLongCacheStream(AbstractCacheStream other)
This constructor is to be used only when a user calls a map or flat map method changing to an IntStream
from a CacheStream, Stream, DoubleStream, IntStream etc.
|
addIntermediateOperation, addIntermediateOperationMap, addIntermediateOperationMap, close, isParallel, markDistinct, markSkip, markSorted, onClose, parallel, sequential, supplierForSegments, supplierForSegments, unordered
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
builder, concat, empty, generate, iterate, of, of, parallel, range, rangeClosed, sequential
close, isParallel, onClose, unordered
protected DistributedLongCacheStream(AbstractCacheStream other)
other
- other instance of AbstractCacheStream
to copy details fromprotected LongStream unwrap()
unwrap
in class AbstractCacheStream<Long,LongStream,LongConsumer>
public LongStream filter(LongPredicate predicate)
filter
in interface LongStream
public LongStream map(LongUnaryOperator mapper)
map
in interface LongStream
public <U> Stream<U> mapToObj(LongFunction<? extends U> mapper)
mapToObj
in interface LongStream
public IntStream mapToInt(LongToIntFunction mapper)
mapToInt
in interface LongStream
public DoubleStream mapToDouble(LongToDoubleFunction mapper)
mapToDouble
in interface LongStream
public LongStream flatMap(LongFunction<? extends LongStream> mapper)
flatMap
in interface LongStream
public LongStream distinct()
distinct
in interface LongStream
public LongStream sorted()
sorted
in interface LongStream
public LongStream peek(LongConsumer action)
peek
in interface LongStream
public DoubleStream asDoubleStream()
asDoubleStream
in interface LongStream
public Stream<Long> boxed()
boxed
in interface LongStream
public LongStream limit(long maxSize)
limit
in interface LongStream
public LongStream skip(long n)
skip
in interface LongStream
public void forEach(LongConsumer action)
forEach
in interface LongStream
public void forEachOrdered(LongConsumer action)
forEachOrdered
in interface LongStream
public long[] toArray()
toArray
in interface LongStream
public long reduce(long identity, LongBinaryOperator op)
reduce
in interface LongStream
public OptionalLong reduce(LongBinaryOperator op)
reduce
in interface LongStream
public <R> R collect(Supplier<R> supplier, ObjLongConsumer<R> accumulator, BiConsumer<R,R> combiner)
collect
in interface LongStream
public long sum()
sum
in interface LongStream
public OptionalLong min()
min
in interface LongStream
public OptionalLong max()
max
in interface LongStream
public OptionalDouble average()
average
in interface LongStream
public LongSummaryStatistics summaryStatistics()
summaryStatistics
in interface LongStream
public boolean anyMatch(LongPredicate predicate)
anyMatch
in interface LongStream
public boolean allMatch(LongPredicate predicate)
allMatch
in interface LongStream
public boolean noneMatch(LongPredicate predicate)
noneMatch
in interface LongStream
public OptionalLong findFirst()
findFirst
in interface LongStream
public OptionalLong findAny()
findAny
in interface LongStream
public PrimitiveIterator.OfLong iterator()
iterator
in interface BaseStream<Long,LongStream>
iterator
in interface LongStream
public Spliterator.OfLong spliterator()
spliterator
in interface BaseStream<Long,LongStream>
spliterator
in interface LongStream
public long count()
count
in interface LongStream
protected <R> DistributedCacheStream<R> cacheStream()
protected DistributedDoubleCacheStream doubleCacheStream()
protected DistributedIntCacheStream intCacheStream()
Copyright © 2017 JBoss, a division of Red Hat. All rights reserved.