public class PeriodicSourceFunction extends Object implements org.apache.flink.streaming.api.functions.source.SourceFunction<org.apache.flink.types.Row>
Constructor and Description |
---|
PeriodicSourceFunction(long interval,
List<List<org.apache.flink.types.Row>> data) |
Modifier and Type | Method and Description |
---|---|
void |
cancel() |
void |
run(org.apache.flink.streaming.api.functions.source.SourceFunction.SourceContext<org.apache.flink.types.Row> sourceContext) |
public PeriodicSourceFunction(long interval, List<List<org.apache.flink.types.Row>> data)
interval
- The time interval in milliseconds to collect data into sourceContext.data
- The data to be collected. Each element is a list of records to be collected
between two adjacent intervals.public void run(org.apache.flink.streaming.api.functions.source.SourceFunction.SourceContext<org.apache.flink.types.Row> sourceContext) throws Exception
run
in interface org.apache.flink.streaming.api.functions.source.SourceFunction<org.apache.flink.types.Row>
Exception
public void cancel()
cancel
in interface org.apache.flink.streaming.api.functions.source.SourceFunction<org.apache.flink.types.Row>
Copyright © 2019–2023 The Apache Software Foundation. All rights reserved.