Interface AggregateOperation2<T0,​T1,​A,​R>

Type Parameters:
T0 - the type of item in stream-0
T1 - the type of item in stream-1
A - the type of the accumulator
R - the type of the aggregation result
All Superinterfaces:
AggregateOperation<A,​R>, Serializable

public interface AggregateOperation2<T0,​T1,​A,​R>
extends AggregateOperation<A,​R>
Specialization of AggregateOperation (refer to its extensive documentation) to the "arity-2" case with two data streams being aggregated over. AggregateOperations contains factories for the built-in implementations and you can create your own using the aggregate operation builder.

This example constructs an operation that sums up long values from two streams:

 AggregateOperation2<Long, Long, LongAccumulator, Long> aggrOp = AggregateOperation

All the functions must be stateless and cooperative.