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 Set<? extends org.apache.flink.api.common.watermark.WatermarkDeclaration> declareWatermarks()
      Explicitly declare watermarks upfront.
      default Set<org.apache.flink.api.common.state.StateDeclaration> usesStates()
      Explicitly declares states upfront.
    • Method Detail

      • 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.
      • declareWatermarks

        default Set<? extends org.apache.flink.api.common.watermark.WatermarkDeclaration> declareWatermarks()
        Explicitly declare watermarks upfront. Each specific watermark must be declared in this method before it can be used.
        Returns:
        all watermark declarations used by this application.
      • 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.