org.apache.storm.trident.operation.builtin

## Class FirstN

- java.lang.Object
- - org.apache.storm.trident.operation.builtin.FirstN

- All Implemented Interfaces:
    Assembly

      public class FirstN
      extends Object
      implements Assembly

  An `Assembly` implementation.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `FirstN.FirstNAgg`
    `static class` | `FirstN.FirstNSortedAgg`

  - ### Constructor Summary

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

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Stream` | `apply(Stream input)` Applies the `Assembly` to a given `Stream`.

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

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

- - ### Constructor Detail

    - #### FirstN

          public FirstN(int n,
                        String sortField)

    - #### FirstN

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

  - ### Method Detail

    - #### apply

          public Stream apply(Stream input)

      Description copied from interface: `Assembly`

      Applies the `Assembly` to a given `Stream`.

      Specified by:
        `apply` in interface `Assembly`

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