1 package dst.ass3.event;
3 import dst.ass3.event.model.events.*;
4 import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;
5 import org.apache.flink.streaming.api.functions.sink.SinkFunction;
6 import org.apache.flink.streaming.api.windowing.time.Time;
9 * This class should be used to implement the event processing steps as described in the assignment. The test classes
10 * will inject SinkFunctions, create a new StreamExecutionEnvironment and then call {@link
11 * #initialize(StreamExecutionEnvironment)}.
13 public interface IEventProcessingEnvironment {
16 * Initializes the event processing graph on the {@link StreamExecutionEnvironment}. This function is called
17 * after all sinks have been set.
19 void initialize(StreamExecutionEnvironment env);
22 * Sets the timeout limit of a streaming event.
24 * @param time the timeout limit
26 void setUploadDurationTimeout(Time time);
28 void setLifecycleEventStreamSink(SinkFunction<LifecycleEvent> sink);
30 void setUploadDurationStreamSink(SinkFunction<UploadDuration> sink);
32 void setAverageUploadDurationStreamSink(SinkFunction<AverageUploadDuration> sink);
34 void setUploadTimeoutWarningStreamSink(SinkFunction<UploadTimeoutWarning> sink);
36 void setUploadFailedWarningStreamSink(SinkFunction<UploadFailedWarning> sink);
38 void setAlertStreamSink(SinkFunction<Alert> sink);