Interface ProcessTableFunction.Context

  • All Known Subinterfaces:
    ProcessTableFunction.OnTimerContext
    Enclosing class:
    ProcessTableFunction<T>

    @PublicEvolving
    public static interface ProcessTableFunction.Context
    Context that can be added as a first argument to the eval() method for additional information about the input tables and other services provided by the framework.
    • Method Detail

      • timeContext

        <TimeType> ProcessTableFunction.TimeContext<TimeType> timeContext​(Class<TimeType> conversionClass)
        Returns a specialized ProcessTableFunction.TimeContext to work with time and timers.

        Time and timer timestamps can be represented as either Instant, LocalDateTime, or Long. Time and timers are based on milliseconds since epoch and do not take the local session timezone into consideration.

        Note: A timer context is always scoped under the currently processed event (either the current input row or a firing timer).

        Parameters:
        conversionClass - representation of time and timer timestamps
        Returns:
        the context for time and timer services
      • tableSemanticsFor

        TableSemantics tableSemanticsFor​(String argName)
        Returns additional information about the semantics of a table argument.
        Parameters:
        argName - name of the table argument; either reflectively extracted or manually defined via ArgumentHint.name().
      • clearState

        void clearState​(String stateName)
        Clears the given state entry within the virtual partition once the eval() method returns.

        Semantically this is equal to setting all fields of the state entry to null shortly before the eval() method returns.

        Parameters:
        stateName - name of the state entry; either reflectively extracted or manually defined via StateHint.name().
      • clearAllState

        void clearAllState()
        Clears all state entries within the virtual partition once the eval() method returns.

        Semantically, this is equal to calling clearState(String) on all state entries.

      • clearAllTimers

        void clearAllTimers()
        Clears all timers within the virtual partition.
      • clearAll

        void clearAll()
        Clears the virtual partition including timers and state.