IN
- type of input elements@PublicEvolving public interface TimedOutPartialMatchHandler<IN>
PatternProcessFunction
to be able to handle timed out partial matches implement this
interface as well. Example:
private class MyFunction extends PatternProcessFunction<IN, OUT> implements TimedOutPartialMatchHandler<IN> {
}
Modifier and Type | Method and Description |
---|---|
void |
processTimedOutMatch(Map<String,List<IN>> match,
PatternProcessFunction.Context ctx)
Called for every timed out partial match (due to
Pattern.within(Time) ). |
void processTimedOutMatch(Map<String,List<IN>> match, PatternProcessFunction.Context ctx) throws Exception
Pattern.within(Time)
). It enables custom handling, e.g. one can
emit the timed out results through a side output:
{@code private final OutputTagtimedOutPartialMatchesTag = ... private class MyFunction extends PatternProcessFunction implements TimedOutPartialMatchHandler {
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 outputsException
- This method may throw exceptions. Throwing an exception will cause the
operation to fail and may trigger recovery.Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.