Class SkipPastLastStrategy
- java.lang.Object
-
- org.apache.flink.cep.nfa.aftermatch.AfterMatchSkipStrategy
-
- org.apache.flink.cep.nfa.aftermatch.SkipPastLastStrategy
-
- All Implemented Interfaces:
Serializable
public final class SkipPastLastStrategy extends AfterMatchSkipStrategy
Discards every partial match that started before emitted match ended.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static SkipPastLastStrategy
INSTANCE
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected EventId
getPruningId(Collection<Map<String,List<EventId>>> match)
Retrieves event id of the pruning element from the given match based on the strategy.boolean
isSkipStrategy()
Tells if the strategy may skip some matches.protected boolean
shouldPrune(EventId startEventID, EventId pruningId)
Tells if the partial/completed match starting at given id should be prunned by given pruningId.String
toString()
-
Methods inherited from class org.apache.flink.cep.nfa.aftermatch.AfterMatchSkipStrategy
getPatternName, noSkip, prune, skipPastLastEvent, skipToFirst, skipToLast, skipToNext
-
-
-
-
Field Detail
-
INSTANCE
public static final SkipPastLastStrategy INSTANCE
-
-
Method Detail
-
getPruningId
protected EventId getPruningId(Collection<Map<String,List<EventId>>> match)
Description copied from class:AfterMatchSkipStrategy
Retrieves event id of the pruning element from the given match based on the strategy.- Specified by:
getPruningId
in classAfterMatchSkipStrategy
- Parameters:
match
- match corresponding to which should the pruning happen- Returns:
- pruning event id
-
isSkipStrategy
public final boolean isSkipStrategy()
Description copied from class:AfterMatchSkipStrategy
Tells if the strategy may skip some matches.- Specified by:
isSkipStrategy
in classAfterMatchSkipStrategy
- Returns:
- false if the strategy is NO_SKIP strategy
-
shouldPrune
protected final boolean shouldPrune(EventId startEventID, EventId pruningId)
Description copied from class:AfterMatchSkipStrategy
Tells if the partial/completed match starting at given id should be prunned by given pruningId.- Specified by:
shouldPrune
in classAfterMatchSkipStrategy
- Parameters:
startEventID
- starting event id of a partial/completed matchpruningId
- pruningId calculated by this strategy- Returns:
- true if the match should be pruned
-
-