Package com.hazelcast.jet.aggregate
Class AllOfAggregationBuilder<T>
java.lang.Object
com.hazelcast.jet.aggregate.AllOfAggregationBuilder<T>
- Type Parameters:
T
- the type of the input items
Offers a step-by-step API to create a composite of multiple aggregate
operations. To obtain it, call
AggregateOperations.allOfBuilder()
.- Since:
- Jet 3.0
-
Method Summary
Modifier and TypeMethodDescription<R> Tag<R>
add
(AggregateOperation1<? super T, ?, R> operation) Adds the supplied aggregate operation to the composite.build()
Builds and returns the compositeAggregateOperation1
.<R> AggregateOperation1<T,
Object[], R> build
(FunctionEx<ItemsByTag, R> exportFinishFn) Builds and returns the compositeAggregateOperation1
.
-
Method Details
-
add
Adds the supplied aggregate operation to the composite. Use the returnedTag
as a key in theItemsByTag
you get in the result of the composite aggregation.- Type Parameters:
R
- the result type of this operation
-
build
Builds and returns the compositeAggregateOperation1
. Its result type isItemsByTag
containing all the tags you got from theadd(com.hazelcast.jet.aggregate.AggregateOperation1<? super T, ?, R>)
method. -
build
@Nonnull public <R> AggregateOperation1<T,Object[], buildR> (@Nonnull FunctionEx<ItemsByTag, R> exportFinishFn) Builds and returns the compositeAggregateOperation1
. It will call the suppliedexportFinishFn
to transform theItemsByTag
it creates to the result type it emits as the actual result.- Parameters:
exportFinishFn
- function that converts theItemsByTag
to the target result type. It must be stateless and cooperative.
-