## Uses of Interface
com.hazelcast.jet.aggregate.AggregateOperation

- Packages that use AggregateOperation
  Package | Description
  --- | ---
  com.hazelcast.jet.aggregate | Contains `AggregateOperation` and several its variants, as well as a builder object for the aggregate operations.
  com.hazelcast.jet.core.processor | Contains static utility classes with factories of Jet processors.
  com.hazelcast.jet.pipeline | The Pipeline API is Jet's high-level API to build and execute distributed computation jobs.

- - ### Uses of AggregateOperation in com.hazelcast.jet.aggregate

    Subinterfaces of AggregateOperation in com.hazelcast.jet.aggregate
    Modifier and Type | Interface and Description
    --- | ---
    `interface` | `AggregateOperation1<T,A,R>` Specialization of `AggregateOperation` (refer to its extensive documentation) to the "arity-1" case with a single data stream being aggregated over.
    `interface` | `AggregateOperation2<T0,T1,A,R>` Specialization of `AggregateOperation` (refer to its extensive documentation) to the "arity-2" case with two data streams being aggregated over.
    `interface` | `AggregateOperation3<T0,T1,T2,A,R>` Specialization of `AggregateOperation` (refer to its extensive documentation) to the "arity-3" case with three data streams being aggregated over.

    Methods in com.hazelcast.jet.aggregate that return AggregateOperation
    Modifier and Type | Method and Description
    --- | ---
    `<R_NEW> AggregateOperation<A,R_NEW>` | AggregateOperationBuilder.VarArity.`andExportFinish(FunctionEx<? super A,? extends R_NEW> exportFinishFn)` Registers the supplied function as both the `export` and `finish` primitive.
    `AggregateOperation<A,R>` | AggregateOperationBuilder.VarArity.`andFinish(FunctionEx<? super A,? extends R> finishFn)` Registers the supplied function as the `finish` primitive.
    `<R_NEW> AggregateOperation<A,R_NEW>` | AggregateOperation.`andThen(FunctionEx<? super R,? extends R_NEW> thenFn)` Returns a copy of this aggregate operation, but with the `export` and `finish` primitives composed with the supplied `thenFn`.
    `AggregateOperation<Object[],ItemsByTag>` | CoAggregateOperationBuilder.`build()` Builds and returns the `AggregateOperation`.
    `<R> AggregateOperation<Object[],R>` | CoAggregateOperationBuilder.`build(FunctionEx<? super ItemsByTag,? extends R> exportFinishFn)` Builds and returns the multi-input `AggregateOperation`.
    `AggregateOperation<A,R>` | AggregateOperation.`withAccumulateFns(BiConsumerEx... accumulateFns)` Returns a copy of this aggregate operation, but with all the `accumulate` primitives replaced with the ones supplied here.
    `AggregateOperation<A,A>` | AggregateOperation.`withIdentityFinish()` Returns a copy of this aggregate operation, but with the `finish` primitive replaced with the identity function.

  - ### Uses of AggregateOperation in com.hazelcast.jet.core.processor

    Methods in com.hazelcast.jet.core.processor with parameters of type AggregateOperation
    Modifier and Type | Method and Description
    --- | ---
    `static <K,A> SupplierEx<Processor>` | Processors.`accumulateByFrameP(List<FunctionEx<?,? extends K>> keyFns, List<ToLongFunctionEx<?>> timestampFns, TimestampKind timestampKind, SlidingWindowPolicy winPolicy, AggregateOperation<A,?> aggrOp)` Returns a supplier of processors for the first-stage vertex in a two-stage sliding window aggregation setup (see the `class Javadoc` for an explanation of aggregation stages).
    `static <K,A> SupplierEx<Processor>` | Processors.`accumulateByKeyP(List<FunctionEx<?,? extends K>> getKeyFns, AggregateOperation<A,?> aggrOp)` Returns a supplier of processors for the first-stage vertex in a two-stage group-and-aggregate setup.
    `static <A,R> SupplierEx<Processor>` | Processors.`accumulateP(AggregateOperation<A,R> aggrOp)` Returns a supplier of processors for a vertex that performs the provided aggregate operation on all the items it receives.
    `static <K,A,R,OUT> SupplierEx<Processor>` | Processors.`aggregateByKeyP(List<FunctionEx<?,? extends K>> keyFns, AggregateOperation<A,R> aggrOp, BiFunctionEx<? super K,? super R,OUT> mapToOutputFn)` Returns a supplier of processors for a vertex that groups items by key and performs the provided aggregate operation on each group.
    `static <A,R> SupplierEx<Processor>` | Processors.`aggregateP(AggregateOperation<A,R> aggrOp)` Returns a supplier of processors for a vertex that performs the provided aggregate operation on all the items it receives.
    `static <K,A,R,OUT> SupplierEx<Processor>` | Processors.`aggregateToSessionWindowP(long sessionTimeout, long earlyResultsPeriod, List<ToLongFunctionEx<?>> timestampFns, List<FunctionEx<?,? extends K>> keyFns, AggregateOperation<A,? extends R> aggrOp, KeyedWindowResultFunction<? super K,? super R,? extends OUT> mapToOutputFn)` Returns a supplier of processors for a vertex that aggregates events into session windows.
    `static <K,A,R,OUT> SupplierEx<Processor>` | Processors.`aggregateToSlidingWindowP(List<FunctionEx<?,? extends K>> keyFns, List<ToLongFunctionEx<?>> timestampFns, TimestampKind timestampKind, SlidingWindowPolicy winPolicy, long earlyResultsPeriod, AggregateOperation<A,? extends R> aggrOp, KeyedWindowResultFunction<? super K,? super R,? extends OUT> mapToOutputFn)` Returns a supplier of processors for a vertex that aggregates events into a sliding window in a single stage (see the `class Javadoc` for an explanation of aggregation stages).
    `static <K,A,R,OUT> SupplierEx<Processor>` | Processors.`combineByKeyP(AggregateOperation<A,R> aggrOp, BiFunctionEx<? super K,? super R,OUT> mapToOutputFn)` Returns a supplier of processors for the second-stage vertex in a two-stage group-and-aggregate setup.
    `static <A,R> SupplierEx<Processor>` | Processors.`combineP(AggregateOperation<A,R> aggrOp)` Returns a supplier of processors for a vertex that performs the provided aggregate operation on all the items it receives.
    `static <K,A,R,OUT> SupplierEx<Processor>` | Processors.`combineToSlidingWindowP(SlidingWindowPolicy winPolicy, AggregateOperation<A,? extends R> aggrOp, KeyedWindowResultFunction<? super K,? super R,? extends OUT> mapToOutputFn)` Returns a supplier of processors for the second-stage vertex in a two-stage sliding window aggregation setup (see the `class Javadoc` for an explanation of aggregation stages).

  - ### Uses of AggregateOperation in com.hazelcast.jet.pipeline

    Methods in com.hazelcast.jet.pipeline with parameters of type AggregateOperation
    Modifier and Type | Method and Description
    --- | ---
    `<R> StreamStage<KeyedWindowResult<K,R>>` | WindowGroupAggregateBuilder1.`build(AggregateOperation<?,? extends R> aggrOp)` Creates and returns a pipeline stage that performs a windowed cogroup-and-aggregate of the pipeline stages registered with this builder object.
    `<R> BatchStage<Map.Entry<K,R>>` | GroupAggregateBuilder1.`build(AggregateOperation<?,R> aggrOp)` Creates and returns a pipeline stage that performs the co-grouping and aggregation of pipeline stages registered with this builder object.
    `<R> BatchStage<R>` | AggregateBuilder1.`build(AggregateOperation<?,R> aggrOp)` Creates and returns a pipeline stage that performs the co-aggregation of pipeline stages registered with this builder object.
    `<R,OUT> BatchStage<OUT>` | GroupAggregateBuilder1.`build(AggregateOperation<?,R> aggrOp, BiFunctionEx<? super K,? super R,OUT> mapToOutputFn)` Deprecated. This is a leftover from an earlier development cycle of the Pipeline API. Use `GroupAggregateBuilder1.build(AggregateOperation)` instead and add a separate mapping stage with `mapToOutputFn`.
    `<A,R> StreamStage<WindowResult<R>>` | WindowAggregateBuilder1.`build(AggregateOperation<A,R> aggrOp)` Creates and returns a pipeline stage that performs a windowed co-aggregation of the pipeline stages registered with this builder object.

Copyright © 2019. All rights reserved.