R0
- type of the aggregated result for stream-0public class WindowAggregateBuilder<R0> extends Object
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
.
Modifier and Type | Method and Description |
---|---|
<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.
|
StreamStage<TimestampedItem<ItemsByTag>> |
build()
Convenience for
build(mapToOutputFn)
which emits TimestampedItem s as output. |
<OUT> StreamStage<OUT> |
build(WindowResultFunction<? super ItemsByTag,? extends OUT> mapToOutputFn)
Creates and returns a pipeline stage that performs a windowed
co-aggregation of the stages registered with this builder object.
|
Tag<R0> |
tag0()
Returns the tag corresponding to the pipeline stage this builder
was obtained from.
|
@Nonnull public Tag<R0> tag0()
AggregateOperation
that you'll pass to build(aggrOp)
.@Nonnull public <T,R> Tag<R> add(StreamStage<T> stage, AggregateOperation1<? super T,?,? extends R> aggrOp)
AggregateOperation
that you'll pass to
build()
.@Nonnull public <OUT> StreamStage<OUT> build(@Nonnull WindowResultFunction<? super ItemsByTag,? extends OUT> mapToOutputFn)
ItemsByTag
and the mapToOutputFn
you supply transforms it to the final result to emit. Use
the tags you got from this builder in the implementation of mapToOutputFn
to access the results.OUT
- the output item typemapToOutputFn
- the function that transforms the results into the output items@Nonnull public StreamStage<TimestampedItem<ItemsByTag>> build()
build(mapToOutputFn)
which emits TimestampedItem
s as output. The timestamp corresponds
to the window's end.Copyright © 2018 Hazelcast, Inc.. All rights reserved.