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 SkipPastLastStrategyINSTANCE
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected EventIdgetPruningId(Collection<Map<String,List<EventId>>> match)Retrieves event id of the pruning element from the given match based on the strategy.booleanisSkipStrategy()Tells if the strategy may skip some matches.protected booleanshouldPrune(EventId startEventID, EventId pruningId)Tells if the partial/completed match starting at given id should be prunned by given pruningId.StringtoString()-
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:AfterMatchSkipStrategyRetrieves event id of the pruning element from the given match based on the strategy.- Specified by:
getPruningIdin classAfterMatchSkipStrategy- Parameters:
match- match corresponding to which should the pruning happen- Returns:
- pruning event id
-
isSkipStrategy
public final boolean isSkipStrategy()
Description copied from class:AfterMatchSkipStrategyTells if the strategy may skip some matches.- Specified by:
isSkipStrategyin classAfterMatchSkipStrategy- Returns:
- false if the strategy is NO_SKIP strategy
-
shouldPrune
protected final boolean shouldPrune(EventId startEventID, EventId pruningId)
Description copied from class:AfterMatchSkipStrategyTells if the partial/completed match starting at given id should be prunned by given pruningId.- Specified by:
shouldPrunein classAfterMatchSkipStrategy- Parameters:
startEventID- starting event id of a partial/completed matchpruningId- pruningId calculated by this strategy- Returns:
- true if the match should be pruned
-
-