Interface NamespaceAggsHandleFunctionBase<N>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void accumulate​(RowData inputRow)
      Accumulates the input values to the accumulators.
      void cleanup​(N namespace)
      Cleanup for the retired accumulators state.
      void close()
      Tear-down method for this function.
      RowData createAccumulators()
      Initializes the accumulators and save them to a accumulators row.
      RowData getAccumulators()
      Gets the current accumulators (saved in a row) which contains the current aggregated results.
      void merge​(N namespace, RowData otherAcc)
      Merges the other accumulators into current accumulators.
      void open​(StateDataViewStore store)
      Initialization method for the function.
      void retract​(RowData inputRow)
      Retracts the input values from the accumulators.
      void setAccumulators​(N namespace, RowData accumulators)
      Set the current accumulators (saved in a row) which contains the current aggregated results.
    • Method Detail

      • setAccumulators

        void setAccumulators​(N namespace,
                             RowData accumulators)
                      throws Exception
        Set the current accumulators (saved in a row) which contains the current aggregated results.
        Parameters:
        accumulators - current accumulators
        Throws:
        Exception
      • accumulate

        void accumulate​(RowData inputRow)
                 throws Exception
        Accumulates the input values to the accumulators.
        Parameters:
        inputRow - input values bundled in a row
        Throws:
        Exception
      • retract

        void retract​(RowData inputRow)
              throws Exception
        Retracts the input values from the accumulators.
        Parameters:
        inputRow - input values bundled in a row
        Throws:
        Exception
      • merge

        void merge​(N namespace,
                   RowData otherAcc)
            throws Exception
        Merges the other accumulators into current accumulators.
        Parameters:
        otherAcc - The other row of accumulators
        Throws:
        Exception
      • createAccumulators

        RowData createAccumulators()
                            throws Exception
        Initializes the accumulators and save them to a accumulators row.
        Returns:
        a row of accumulators which contains the aggregated results
        Throws:
        Exception
      • getAccumulators

        RowData getAccumulators()
                         throws Exception
        Gets the current accumulators (saved in a row) which contains the current aggregated results.
        Returns:
        the current accumulators
        Throws:
        Exception
      • cleanup

        void cleanup​(N namespace)
              throws Exception
        Cleanup for the retired accumulators state.
        Throws:
        Exception
      • close

        void close()
            throws Exception
        Tear-down method for this function. It can be used for clean up work. By default, this method does nothing.
        Throws:
        Exception