Class SkipToLastStrategy
- java.lang.Object
-
- org.apache.flink.cep.nfa.aftermatch.AfterMatchSkipStrategy
-
- org.apache.flink.cep.nfa.aftermatch.SkipToLastStrategy
-
- All Implemented Interfaces:
Serializable
public final class SkipToLastStrategy extends AfterMatchSkipStrategy
Discards every partial match that started before the last event of emitted match mapped to *PatternName*.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)Optional<String>getPatternName()Name of pattern that processing will be skipped to.protected EventIdgetPruningId(Collection<Map<String,List<EventId>>> match)Retrieves event id of the pruning element from the given match based on the strategy.inthashCode()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.org.apache.flink.cep.nfa.aftermatch.SkipToElementStrategythrowExceptionOnMiss()Enables throwing exception if no events mapped to the *PatternName*.StringtoString()-
Methods inherited from class org.apache.flink.cep.nfa.aftermatch.AfterMatchSkipStrategy
noSkip, prune, skipPastLastEvent, skipToFirst, skipToLast, skipToNext
-
-
-
-
Method Detail
-
throwExceptionOnMiss
public org.apache.flink.cep.nfa.aftermatch.SkipToElementStrategy throwExceptionOnMiss()
Enables throwing exception if no events mapped to the *PatternName*. If not enabled and no events were mapped,NoSkipStrategywill be used
-
isSkipStrategy
public 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 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
-
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
-
getPatternName
public Optional<String> getPatternName()
Description copied from class:AfterMatchSkipStrategyName of pattern that processing will be skipped to.- Overrides:
getPatternNamein classAfterMatchSkipStrategy
-
-