E_IN
- type of elements in the upstream sourceE_OUT
- type of elements in produced by this stagepublic abstract static class ReferencePipeline.StatefulOp<E_IN,E_OUT> extends ReferencePipeline<E_IN,E_OUT>
ReferencePipeline.Head<E_IN,E_OUT>, ReferencePipeline.StatefulOp<E_IN,E_OUT>, ReferencePipeline.StatelessOp<E_IN,E_OUT>
Stream.Builder<T>
sourceOrOpFlags
Constructor and Description |
---|
StatefulOp(AbstractPipeline<?,E_IN,?> upstream,
StreamShape inputShape,
int opFlags)
Construct a new Stream by appending a stateful intermediate operation
to an existing stream.
|
Modifier and Type | Method and Description |
---|---|
abstract <P_IN> Node<E_OUT> |
opEvaluateParallel(PipelineHelper<E_OUT> helper,
Spliterator<P_IN> spliterator,
IntFunction<E_OUT[]> generator)
Performs a parallel evaluation of the operation using the specified
PipelineHelper which describes the upstream intermediate
operations. |
boolean |
opIsStateful()
Returns whether this operation is stateful or not.
|
allMatch, anyMatch, collect, collect, count, distinct, evaluateToNode, filter, findAny, findFirst, flatMap, flatMapToDouble, flatMapToInt, flatMapToLong, forEach, forEachOrdered, forEachWithCancel, getOutputShape, iterator, lazySpliterator, limit, makeNodeBuilder, map, mapToDouble, mapToInt, mapToLong, max, min, noneMatch, peek, reduce, reduce, reduce, skip, sorted, sorted, toArray, toArray, unordered, wrap
close, evaluate, evaluateToArrayNode, getStreamAndOpFlags, getStreamFlags, isParallel, onClose, opEvaluateParallelLazy, opWrapSink, parallel, sequential, spliterator, wrapSink
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
builder, concat, empty, generate, iterate, of, of
close, isParallel, onClose, parallel, sequential, spliterator
public StatefulOp(AbstractPipeline<?,E_IN,?> upstream, StreamShape inputShape, int opFlags)
upstream
- The upstream pipeline stageinputShape
- The stream shape for the upstream pipeline stageopFlags
- Operation flags for the new stagepublic final boolean opIsStateful()
AbstractPipeline
AbstractPipeline.opEvaluateParallel(PipelineHelper, java.util.Spliterator, java.util.function.IntFunction)
must be overridden.opIsStateful
in class AbstractPipeline<E_IN,E_OUT,Stream<E_OUT>>
true
if this operation is statefulpublic abstract <P_IN> Node<E_OUT> opEvaluateParallel(PipelineHelper<E_OUT> helper, Spliterator<P_IN> spliterator, IntFunction<E_OUT[]> generator)
AbstractPipeline
PipelineHelper
which describes the upstream intermediate
operations. Only called on stateful operations. If AbstractPipeline.opIsStateful()
returns true then implementations must override the
default implementation.opEvaluateParallel
in class AbstractPipeline<E_IN,E_OUT,Stream<E_OUT>>
helper
- the pipeline helper describing the pipeline stagesspliterator
- the source Spliterator
generator
- the array generatorNode
describing the result of the evaluation