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
public final class AllOfAggregationBuilder<T> extends java.lang.Object
Offers a step-by-step API to create a composite of multiple aggregate operations. To obtain it, callAggregateOperations.allOfBuilder()
.- Since:
- Jet 3.0
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <R> Tag<R>
add(AggregateOperation1<? super T,?,R> operation)
Adds the supplied aggregate operation to the composite.AggregateOperation1<T,java.lang.Object[],ItemsByTag>
build()
Builds and returns the compositeAggregateOperation1
.<R> AggregateOperation1<T,java.lang.Object[],R>
build(FunctionEx<ItemsByTag,R> exportFinishFn)
Builds and returns the compositeAggregateOperation1
.
-
-
-
Method Detail
-
add
@Nonnull public <R> Tag<R> add(@Nonnull AggregateOperation1<? super T,?,R> operation)
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
@Nonnull public AggregateOperation1<T,java.lang.Object[],ItemsByTag> 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,java.lang.Object[],R> build(@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.
-
-