T
- Type of the processed eventspublic class NFA<T> extends Object implements Serializable
The NFA processes input events which will chnage the internal state machine. Whenever a final state is reached, the matching sequence of events is emitted. The implementation is strongly based on the paper "Efficient Pattern Matching over Event Streams".
Modifier and Type | Class and Description |
---|---|
static class |
NFA.Serializer<T>
TypeSerializer for NFA that uses Java Serialization. |
Constructor and Description |
---|
NFA(TypeSerializer<T> eventSerializer,
long windowTime,
boolean handleTimeout) |
Modifier and Type | Method and Description |
---|---|
void |
addState(State<T> state) |
void |
addStates(Collection<State<T>> newStates) |
boolean |
equals(Object obj) |
Set<State<T>> |
getStates() |
int |
hashCode() |
Tuple2<Collection<Map<String,T>>,Collection<Tuple2<Map<String,T>,Long>>> |
process(T event,
long timestamp)
Processes the next input event.
|
public NFA(TypeSerializer<T> eventSerializer, long windowTime, boolean handleTimeout)
public void addStates(Collection<State<T>> newStates)
public Tuple2<Collection<Map<String,T>>,Collection<Tuple2<Map<String,T>,Long>>> process(T event, long timestamp)
event
- The current event to be processed or null if only pruning shall be donetimestamp
- The timestamp of the current eventCopyright © 2014–2017 The Apache Software Foundation. All rights reserved.