Interface ProcessFunction

    • Method Summary

      All Methods Instance Methods Default Methods 
      Modifier and Type Method Description
      default void close()
      Tear-down method for the user code.
      default void open()
      Initialization method for the function.
      default Set<org.apache.flink.api.common.state.StateDeclaration> usesStates()
      Explicitly declares states upfront.
    • Method Detail

      • open

        default void open()
                   throws Exception
        Initialization method for the function. It is called before the actual working methods (like processRecord) and thus suitable for one time setup work.

        By default, this method does nothing.

        Throws:
        Exception - Implementations may forward exceptions, which are caught by the runtime. When the runtime catches an exception, it aborts the task and lets the fail-over logic decide whether to retry the task execution.
      • usesStates

        default Set<org.apache.flink.api.common.state.StateDeclaration> usesStates()
        Explicitly declares states upfront. Each specific state must be declared in this method before it can be used.
        Returns:
        all declared states used by this process function.
      • close

        default void close()
                    throws Exception
        Tear-down method for the user code. It is called after the last call to the main working methods (e.g. processRecord).

        This method can be used for clean up work.

        Throws:
        Exception - Implementations may forward exceptions, which are caught by the runtime. When the runtime catches an exception, it aborts the task and lets the fail-over logic decide whether to retry the task execution.