Class TestSourceContext<T>

  • All Implemented Interfaces:
    org.apache.flink.streaming.api.functions.source.SourceFunction.SourceContext<T>

    public class TestSourceContext<T>
    extends Object
    implements org.apache.flink.streaming.api.functions.source.SourceFunction.SourceContext<T>
    A testable SourceFunction.SourceContext.
    • Constructor Detail

      • TestSourceContext

        public TestSourceContext()
    • Method Detail

      • collect

        public void collect​(T element)
        Specified by:
        collect in interface org.apache.flink.streaming.api.functions.source.SourceFunction.SourceContext<T>
      • collectWithTimestamp

        public void collectWithTimestamp​(T element,
                                         long timestamp)
        Specified by:
        collectWithTimestamp in interface org.apache.flink.streaming.api.functions.source.SourceFunction.SourceContext<T>
      • emitWatermark

        public void emitWatermark​(org.apache.flink.streaming.api.watermark.Watermark mark)
        Specified by:
        emitWatermark in interface org.apache.flink.streaming.api.functions.source.SourceFunction.SourceContext<T>
      • markAsTemporarilyIdle

        public void markAsTemporarilyIdle()
        Specified by:
        markAsTemporarilyIdle in interface org.apache.flink.streaming.api.functions.source.SourceFunction.SourceContext<T>
      • getCheckpointLock

        public Object getCheckpointLock()
        Specified by:
        getCheckpointLock in interface org.apache.flink.streaming.api.functions.source.SourceFunction.SourceContext<T>
      • close

        public void close()
        Specified by:
        close in interface org.apache.flink.streaming.api.functions.source.SourceFunction.SourceContext<T>
      • removeLatestOutput

        public org.apache.flink.streaming.runtime.streamrecord.StreamRecord<T> removeLatestOutput()
      • getCollectedOutputs

        public LinkedBlockingQueue<org.apache.flink.streaming.runtime.streamrecord.StreamRecord<T>> getCollectedOutputs()