Package com.hazelcast.jet.pipeline
Class WindowAggregateBuilder<R0>
java.lang.Object
com.hazelcast.jet.pipeline.WindowAggregateBuilder<R0>
- Type Parameters:
R0
- type of the aggregated result for stream-0
Offers a step-by-step fluent API to build a pipeline stage that
performs a windowed co-aggregation of the data from several input
stages. To obtain it, call
StageWithWindow.aggregateBuilder()
on
one of the stages to co-aggregate and refer to that method's Javadoc for
further details.
Note: this is not a builder of
AggregateOperation
. If that' s what you are looking for, go here
.
- Since:
- Jet 3.0
-
Method Summary
Modifier and TypeMethodDescription<T,
R> Tag<R> add
(StreamStage<T> stage, AggregateOperation1<? super T, ?, ? extends R> aggrOp) Adds another stage that will contribute its data to the aggregate operation to be performed.build()
Creates and returns a pipeline stage that performs a windowed co-aggregation of the stages registered with this builder object.tag0()
Returns the tag corresponding to the pipeline stage this builder was obtained from.
-
Method Details
-
tag0
Returns the tag corresponding to the pipeline stage this builder was obtained from. Use this tag to refer to this stage when building theAggregateOperation
that you'll pass tobuild(aggrOp)
. -
add
@Nonnull public <T,R> Tag<R> add(StreamStage<T> stage, AggregateOperation1<? super T, ?, ? extends R> aggrOp) Adds another stage that will contribute its data to the aggregate operation to be performed. Returns the tag you'll use to refer to this stage when building theAggregateOperation
that you'll pass tobuild()
. -
build
Creates and returns a pipeline stage that performs a windowed co-aggregation of the stages registered with this builder object. The composite aggregate operation places the results of the individual aggregate operations in anItemsByTag
.- Returns:
- a new stage representing the cogroup-and-aggregate operation
-