Class NFACompiler
- java.lang.Object
-
- org.apache.flink.cep.nfa.compiler.NFACompiler
-
public class NFACompiler extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
NFACompiler.NFAFactory<T>
Factory interface forNFA
.
-
Field Summary
Fields Modifier and Type Field Description protected static String
ENDING_STATE_NAME
-
Constructor Summary
Constructors Constructor Description NFACompiler()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
canProduceEmptyMatches(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 Detail
-
ENDING_STATE_NAME
protected static final String ENDING_STATE_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
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
public static boolean canProduceEmptyMatches(Pattern<?,?> pattern)
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
-
-