Interface PatternSelectFunction<IN,​OUT>

  • Type Parameters:
    IN - Type of the input elements
    OUT - Type of the output element
    All Superinterfaces:
    Function, Serializable
    All Known Implementing Classes:
    RichPatternSelectFunction

    public interface PatternSelectFunction<IN,​OUT>
    extends 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 the Pattern. The select method returns exactly one result. If you want to return more than one result, then you have to implement a PatternFlatSelectFunction.
    
     PatternStream<IN> pattern = ...;
    
     DataStream<OUT> result = pattern.select(new MyPatternSelectFunction());
     
    • 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.