Class PatternTimeoutSelectAdapter<IN,​OUT,​T>

    • Method Detail

      • open

        public void open​(org.apache.flink.api.common.functions.OpenContext openContext)
                  throws Exception
        Specified by:
        open in interface org.apache.flink.api.common.functions.RichFunction
        Overrides:
        open in class PatternSelectAdapter<IN,​OUT>
        Throws:
        Exception
      • processTimedOutMatch

        public void processTimedOutMatch​(Map<String,​List<IN>> match,
                                         PatternProcessFunction.Context ctx)
                                  throws Exception
        Description copied from interface: TimedOutPartialMatchHandler
        Called for every timed out partial match (due to Pattern.within(Duration)). It enables custom handling, e.g. one can emit the timed out results through a side output:
        {@code
         private final OutputTag timedOutPartialMatchesTag = ...
        
         private class MyFunction extends PatternProcessFunction implements TimedOutPartialMatchHandler {
        Specified by:
        processTimedOutMatch in interface TimedOutPartialMatchHandler<IN>
        Parameters:
        match - map containing the timed out partial match. Events are identified by their names.
        ctx - enables access to time features and emitting results through side outputs
        Throws:
        Exception - This method may throw exceptions. Throwing an exception will cause the operation to fail and may trigger recovery.