cascading.operation

## Interface GroupAssertion<C>

- All Superinterfaces:
    Assertion<C>, DeclaresResults, Operation<C>, PlannedOperation<C>
  All Known Implementing Classes:
    AssertGroupBase, AssertGroupSizeEquals, AssertGroupSizeLessThan, AssertGroupSizeMoreThan

      public interface GroupAssertion<C>
      extends Assertion<C>

  Class GroupAssertion is a kind of `Assertion` used with the `Every` pipe Operator.

  Implementers should also extend `BaseOperation`.
  See Also:
    `Aggregator`

- - ### Field Summary

    - ### Fields inherited from interface cascading.operation.Operation

      `ANY`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `aggregate(FlowProcess flowProcess, GroupAssertionCall<C> assertionCall)` Method aggregate is called for each `TupleEntry` value in the current grouping.
    `void` | `doAssert(FlowProcess flowProcess, GroupAssertionCall<C> assertionCall)` Method doAssert performs the assertion.
    `void` | `start(FlowProcess flowProcess, GroupAssertionCall<C> assertionCall)` Method start initializes the aggregation procedure and is called for every unique grouping.

    - ### Methods inherited from interface cascading.operation.PlannedOperation

      `supportsPlannerLevel`

    - ### Methods inherited from interface cascading.operation.Operation

      `cleanup, flush, getFieldDeclaration, getNumArgs, isSafe, prepare`

- - ### Method Detail

    - #### start

          void start(FlowProcess flowProcess,
                   GroupAssertionCall<C> assertionCall)

      Method start initializes the aggregation procedure and is called for every unique grouping.

      The AggregatorCall context should be initialized here if necessary.

      The first time this method is called for a given 'process', the AggregatorCall context will be null. This method should set a new instance of the user defined context object. When the AggregatorCall context is not null, it is up to the developer to create a new instance, or 'recycle' the given instance. If recycled, it must be re-initialized to remove any previous state/values.

      For example, if a Map is used to hold the intermediate data for each subsequent `aggregate(cascading.flow.FlowProcess, GroupAssertionCall)` call, new HashMap() should be set on the AggregatorCall instance when `OperationCall.getContext()` is null. On the next grouping, start() will be called again, but this time with the old Map instance. In this case, map.clear() should be invoked before returning.
      Parameters:
        `flowProcess` - of type FlowProcess
        `assertionCall` - of type GroupAssertionCall

    - #### aggregate

          void aggregate(FlowProcess flowProcess,
                       GroupAssertionCall<C> assertionCall)

      Method aggregate is called for each `TupleEntry` value in the current grouping.
      Parameters:
        `flowProcess` - of type FlowProcess
        `assertionCall` - of type GroupAssertionCall

    - #### doAssert

          void doAssert(FlowProcess flowProcess,
                      GroupAssertionCall<C> assertionCall)

      Method doAssert performs the assertion.
      Parameters:
        `flowProcess` - of type FlowProcess
        `assertionCall` - of type GroupAssertionCall

Copyright © 2007-2015 Xplenty, Inc. All Rights Reserved.