Package org.apache.flink.cep
Interface PatternSelectFunction<IN,OUT>
-
- Type Parameters:
IN- Type of the input elementsOUT- Type of the output element
- All Superinterfaces:
org.apache.flink.api.common.functions.Function,Serializable
- All Known Implementing Classes:
RichPatternSelectFunction
public interface PatternSelectFunction<IN,OUT> extends org.apache.flink.api.common.functions.Function, Serializable
Base interface for a pattern select function. A pattern select function is called with a map containing the detected events which can be accessed by their names. The names depend on the definition of thePattern. The select method returns exactly one result. If you want to return more than one result, then you have to implement aPatternFlatSelectFunction.PatternStream<IN> pattern = ...; DataStream<OUT> result = pattern.select(new MyPatternSelectFunction());
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description OUTselect(Map<String,List<IN>> pattern)Generates a result from the given map of events.
-
-
-
Method Detail
-
select
OUT select(Map<String,List<IN>> pattern) throws Exception
Generates a result from the given map of events. The events are identified by their names. Only one resulting element can be generated.- Parameters:
pattern- Map containing the found pattern. Events are identified by their names- Returns:
- Resulting element
- Throws:
Exception- This method may throw exceptions. Throwing an exception will cause the operation to fail and may trigger recovery.
-
-