Class ImpulseSourceFunction
java.lang.Object
org.apache.beam.runners.flink.translation.functions.ImpulseSourceFunction
- All Implemented Interfaces:
Serializable
,org.apache.flink.api.common.functions.Function
,org.apache.flink.streaming.api.checkpoint.CheckpointedFunction
,org.apache.flink.streaming.api.functions.source.SourceFunction<WindowedValue<byte[]>>
public class ImpulseSourceFunction
extends Object
implements org.apache.flink.streaming.api.functions.source.SourceFunction<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:
-
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>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
cancel()
void
initializeState
(org.apache.flink.runtime.state.FunctionInitializationContext context) void
run
(org.apache.flink.streaming.api.functions.source.SourceFunction.SourceContext<WindowedValue<byte[]>> sourceContext) void
snapshotState
(org.apache.flink.runtime.state.FunctionSnapshotContext context)
-
Constructor Details
-
ImpulseSourceFunction
public ImpulseSourceFunction(long idleTimeoutMs)
-
-
Method Details
-
run
public void run(org.apache.flink.streaming.api.functions.source.SourceFunction.SourceContext<WindowedValue<byte[]>> sourceContext) throws Exception - Specified by:
run
in interfaceorg.apache.flink.streaming.api.functions.source.SourceFunction<WindowedValue<byte[]>>
- Throws:
Exception
-
cancel
public void cancel()- Specified by:
cancel
in interfaceorg.apache.flink.streaming.api.functions.source.SourceFunction<WindowedValue<byte[]>>
-
snapshotState
public void snapshotState(org.apache.flink.runtime.state.FunctionSnapshotContext context) - Specified by:
snapshotState
in interfaceorg.apache.flink.streaming.api.checkpoint.CheckpointedFunction
-
initializeState
public void initializeState(org.apache.flink.runtime.state.FunctionInitializationContext context) throws Exception - Specified by:
initializeState
in interfaceorg.apache.flink.streaming.api.checkpoint.CheckpointedFunction
- Throws:
Exception
-