]> git.somenet.org - pub/jan/dst18.git/blob - ass3-event/src/main/java/dst/ass3/event/IEventProcessingEnvironment.java
Add ass3-elastic profile
[pub/jan/dst18.git] / ass3-event / src / main / java / dst / ass3 / event / IEventProcessingEnvironment.java
1 package dst.ass3.event;
2
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;
7
8 /**
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)}.
12  */
13 public interface IEventProcessingEnvironment {
14
15     /**
16      * Initializes the event processing graph on the {@link StreamExecutionEnvironment}. This function is called
17      * after all sinks have been set.
18      */
19     void initialize(StreamExecutionEnvironment env);
20
21     /**
22      * Sets the timeout limit of a streaming event.
23      *
24      * @param time the timeout limit
25      */
26     void setUploadDurationTimeout(Time time);
27
28     void setLifecycleEventStreamSink(SinkFunction<LifecycleEvent> sink);
29
30     void setUploadDurationStreamSink(SinkFunction<UploadDuration> sink);
31
32     void setAverageUploadDurationStreamSink(SinkFunction<AverageUploadDuration> sink);
33
34     void setUploadTimeoutWarningStreamSink(SinkFunction<UploadTimeoutWarning> sink);
35
36     void setUploadFailedWarningStreamSink(SinkFunction<UploadFailedWarning> sink);
37
38     void setAlertStreamSink(SinkFunction<Alert> sink);
39 }