com.hazelcast.jet.pipeline

## Class AggregateBuilder1<T0>

- java.lang.Object
- - com.hazelcast.jet.pipeline.AggregateBuilder1<T0>

- Type Parameters:
    `T0` - type of items in stage-0 (the one you obtained this builder from)

      public class AggregateBuilder1<T0>
      extends Object

  Offers a step-by-step API to build a pipeline stage that co-aggregates the data from several input stages. To obtain it, call `BatchStage.aggregateBuilder()` on the first stage you are co-aggregating. Refer to the documentation of that method for more details.

  Note: this is not a builder of `AggregateOperation`. If that's what you are looking for, go `here`.

  Since:
    3.0

- - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `<T> Tag<T>` | `add(BatchStage<T> stage)` Adds another stage that will contribute its data to the aggregate operation to be performed.
    `<R> BatchStage<R>` | `build(AggregateOperation<?,R> aggrOp)` Creates and returns a pipeline stage that performs the co-aggregation of pipeline stages registered with this builder object.
    `Tag<T0>` | `tag0()` Returns the tag corresponding to the pipeline stage this builder was obtained from.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### tag0

          @Nonnull
          public Tag<T0> tag0()

      Returns the tag corresponding to the pipeline stage this builder was obtained from. Use this tag to refer to this stage when building the `AggregateOperation` that you'll pass to `build(aggrOp)`.

    - #### add

          @Nonnull
          public <T> Tag<T> add(@Nonnull
                                         BatchStage<T> stage)

      Adds another stage that will contribute its data to the aggregate operation to be performed. Returns the tag you'll use to refer to this stage when building the `AggregateOperation` that you'll pass to `build()`.

    - #### build

          @Nonnull
          public <R> BatchStage<R> build(@Nonnull
                                                  AggregateOperation<?,R> aggrOp)

      Creates and returns a pipeline stage that performs the co-aggregation of pipeline stages registered with this builder object. The tags you register with the aggregate operation must match the tags you registered with this builder. Refer to the documentation on `BatchStage.aggregateBuilder()` for more details.
      Type Parameters:
        `R` - type of the output item
      Parameters:
        `aggrOp` - the aggregate operation to perform
      Returns:
        a new stage representing the co-aggregation

Copyright © 2020. All rights reserved.