Class ImpulseSourceFunction

  • All Implemented Interfaces:
    java.io.Serializable, org.apache.flink.api.common.functions.Function, org.apache.flink.streaming.api.checkpoint.CheckpointedFunction, org.apache.flink.streaming.api.functions.source.SourceFunction<org.apache.beam.sdk.values.WindowedValue<byte[]>>

    public class ImpulseSourceFunction
    extends java.lang.Object
    implements org.apache.flink.streaming.api.functions.source.SourceFunction<org.apache.beam.sdk.values.WindowedValue<byte[]>>, org.apache.flink.streaming.api.checkpoint.CheckpointedFunction
    Source function which sends a single global impulse to a downstream operator. It may keep the source alive although its work is already done. It will only shutdown when the streaming job is cancelled.
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface org.apache.flink.streaming.api.functions.source.SourceFunction

        org.apache.flink.streaming.api.functions.source.SourceFunction.SourceContext<T extends java.lang.Object>
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void cancel()  
      void initializeState​(org.apache.flink.runtime.state.FunctionInitializationContext context)  
      void run​(org.apache.flink.streaming.api.functions.source.SourceFunction.SourceContext<org.apache.beam.sdk.values.WindowedValue<byte[]>> sourceContext)  
      void snapshotState​(org.apache.flink.runtime.state.FunctionSnapshotContext context)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ImpulseSourceFunction

        public ImpulseSourceFunction​(long idleTimeoutMs)
    • Method Detail

      • run

        public void run​(org.apache.flink.streaming.api.functions.source.SourceFunction.SourceContext<org.apache.beam.sdk.values.WindowedValue<byte[]>> sourceContext)
                 throws java.lang.Exception
        Specified by:
        run in interface org.apache.flink.streaming.api.functions.source.SourceFunction<org.apache.beam.sdk.values.WindowedValue<byte[]>>
        Throws:
        java.lang.Exception
      • cancel

        public void cancel()
        Specified by:
        cancel in interface org.apache.flink.streaming.api.functions.source.SourceFunction<org.apache.beam.sdk.values.WindowedValue<byte[]>>
      • snapshotState

        public void snapshotState​(org.apache.flink.runtime.state.FunctionSnapshotContext context)
        Specified by:
        snapshotState in interface org.apache.flink.streaming.api.checkpoint.CheckpointedFunction
      • initializeState

        public void initializeState​(org.apache.flink.runtime.state.FunctionInitializationContext context)
                             throws java.lang.Exception
        Specified by:
        initializeState in interface org.apache.flink.streaming.api.checkpoint.CheckpointedFunction
        Throws:
        java.lang.Exception