Package com.hazelcast.jet.aggregate
Class AggregateOperationBuilder.Arity2<T0,T1,A,R>
java.lang.Object
com.hazelcast.jet.aggregate.AggregateOperationBuilder.Arity2<T0,T1,A,R>
- Type Parameters:
T0
- the type of item in stream-0T1
- the type of item in stream-1A
- the type of the accumulatorR
- type of the aggregation result
- Enclosing class:
- AggregateOperationBuilder<A>
The arity-2 variant of the aggregate operation builder. Can be raised to
arity-3 by calling
andAccumulate2()
.-
Method Summary
Modifier and TypeMethodDescription<T2> AggregateOperationBuilder.Arity3<T0,
T1, T2, A, R> andAccumulate2
(BiConsumerEx<? super A, ? super T2> accumulateFn2) Registers theaccumulate
primitive for stream-2, returning the arity-3 variant of the builder.andCombine
(BiConsumerEx<? super A, ? super A> combineFn) Registers thecombine
primitive.andDeduct
(BiConsumerEx<? super A, ? super A> deductFn) Registers thededuct
primitive.<R_NEW> AggregateOperationBuilder.Arity2<T0,
T1, A, R_NEW> andExport
(FunctionEx<? super A, ? extends R_NEW> exportFn) Registers theexport
primitive.<R_NEW> AggregateOperation2<T0,
T1, A, R_NEW> andExportFinish
(FunctionEx<? super A, ? extends R_NEW> exportFinishFn) andFinish
(FunctionEx<? super A, ? extends R> finishFn) Registers thefinish
primitive.
-
Method Details
-
andAccumulate2
@Nonnull public <T2> AggregateOperationBuilder.Arity3<T0,T1, andAccumulate2T2, A, R> (@Nonnull BiConsumerEx<? super A, ? super T2> accumulateFn2) Registers theaccumulate
primitive for stream-2, returning the arity-3 variant of the builder.- Type Parameters:
T2
- the expected type of item in stream-2- Parameters:
accumulateFn2
- theaccumulate
primitive for stream-2. It must be stateless and cooperative.- Returns:
- a new builder object that captures the
T2
type parameter
-
andCombine
@Nonnull public AggregateOperationBuilder.Arity2<T0,T1, andCombineA, R> (@Nullable BiConsumerEx<? super A, ? super A> combineFn) Registers thecombine
primitive.The given function must be stateless and cooperative.
-
andDeduct
@Nonnull public AggregateOperationBuilder.Arity2<T0,T1, andDeductA, R> (@Nullable BiConsumerEx<? super A, ? super A> deductFn) Registers thededuct
primitive.The given function must be stateless and cooperative.
-
andExport
@Nonnull public <R_NEW> AggregateOperationBuilder.Arity2<T0,T1, andExportA, R_NEW> (@Nonnull FunctionEx<? super A, ? extends R_NEW> exportFn) Registers theexport
primitive.The given function must be stateless and cooperative.
-
andFinish
@Nonnull public AggregateOperation2<T0,T1, andFinishA, R> (@Nonnull FunctionEx<? super A, ? extends R> finishFn) Registers thefinish
primitive. Constructs and returns anAggregateOperation2
from the current state of the builder.The given function must be stateless and cooperative.
- Throws:
IllegalStateException
- if theexport
primitive was not registered
-
andExportFinish
@Nonnull public <R_NEW> AggregateOperation2<T0,T1, andExportFinishA, R_NEW> (@Nonnull FunctionEx<? super A, ? extends R_NEW> exportFinishFn) Registers the supplied function as both theexport
andfinish
primitive. Constructs and returns anAggregateOperation2
from the current state of the builder.The given function must be stateless and cooperative.
- Throws:
IllegalStateException
- if theexport
primitive is already registered
-