org.apache.storm.trident.operation.builtin

## Class FirstN.FirstNSortedAgg

- java.lang.Object
- - org.apache.storm.trident.operation.BaseOperation
  - - org.apache.storm.trident.operation.BaseAggregator<PriorityQueue>
    - - org.apache.storm.trident.operation.builtin.FirstN.FirstNSortedAgg

- All Implemented Interfaces:
    Serializable, Aggregator<PriorityQueue>, Operation
  Enclosing class:
    FirstN

      public static class FirstN.FirstNSortedAgg
      extends BaseAggregator<PriorityQueue>

  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `FirstNSortedAgg(int n, String sortField, boolean reverse)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `aggregate(PriorityQueue state, TridentTuple tuple, TridentCollector collector)`
    `void` | `complete(PriorityQueue val, TridentCollector collector)`
    `PriorityQueue` | `init(Object batchId, TridentCollector collector)`

    - ### Methods inherited from class org.apache.storm.trident.operation.BaseOperation

      `cleanup, prepare`

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

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

    - ### Methods inherited from interface org.apache.storm.trident.operation.Operation

      `cleanup, prepare`

- - ### Constructor Detail

    - #### FirstNSortedAgg

          public FirstNSortedAgg(int n,
                                 String sortField,
                                 boolean reverse)

  - ### Method Detail

    - #### init

          public PriorityQueue init(Object batchId,
                                    TridentCollector collector)

    - #### aggregate

          public void aggregate(PriorityQueue state,
                                TridentTuple tuple,
                                TridentCollector collector)

    - #### complete

          public void complete(PriorityQueue val,
                               TridentCollector collector)

Copyright © 2021 The Apache Software Foundation. All rights reserved.