Class NFACompiler
java.lang.Object
org.apache.flink.cep.nfa.compiler.NFACompiler
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancanProduceEmptyMatches(Pattern<?, ?> pattern) Verifies if the provided pattern can possibly generate empty match.static <T> NFACompiler.NFAFactory<T>compileFactory(Pattern<T, ?> pattern, boolean timeoutHandling) Compiles the given pattern into aNFACompiler.NFAFactory.
-
Field Details
-
ENDING_STATE_NAME
- See Also:
-
-
Constructor Details
-
NFACompiler
public NFACompiler()
-
-
Method Details
-
compileFactory
public static <T> NFACompiler.NFAFactory<T> compileFactory(Pattern<T, ?> pattern, boolean timeoutHandling) Compiles the given pattern into aNFACompiler.NFAFactory. The NFA factory can be used to create multiple NFAs.- Type Parameters:
T- Type of the input events- Parameters:
pattern- Definition of sequence patterntimeoutHandling- True if the NFA shall return timed out event patterns- Returns:
- Factory for NFAs corresponding to the given pattern
-
canProduceEmptyMatches
Verifies if the provided pattern can possibly generate empty match. Example of patterns that can possibly generate empty matches are: A*, A?, A* B? etc.- Parameters:
pattern- pattern to check- Returns:
- true if empty match could potentially match the pattern, false otherwise
-