Class RowRecogPartitionStateImpl
java.lang.Object
com.espertech.esper.common.internal.epl.rowrecog.state.RowRecogPartitionStateImpl
- All Implemented Interfaces:
RowRecogPartitionState
All current state holding partial NFA matches.
-
Constructor Summary
ConstructorDescriptionRowRecogPartitionStateImpl
(RowRecogPreviousStrategyImpl getter, List<RowRecogNFAStateEntry> currentStates) Ctor.RowRecogPartitionStateImpl
(RowRecogPreviousStrategyImpl getter, List<RowRecogNFAStateEntry> currentStates, Object optionalKeys) Ctor.RowRecogPartitionStateImpl
(RowRecogStateRandomAccess randomAccess, Object optionalKeys) Ctor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Returns partial matches.int
Returns partition keys, if any.Returns the random access for "prev".boolean
void
removeEventFromPrev
(EventBean oldEvent) Remove an event from random access for "prev".void
removeEventFromPrev
(EventBean[] oldEvents) Remove an event from random access for "prev".int
removeEventFromState
(EventBean oldEvent) Remove an event from state.static List<RowRecogNFAStateEntry>
removeEventFromState
(EventBean oldEvent, Iterator<RowRecogNFAStateEntry> states) void
setCurrentStates
(List<RowRecogNFAStateEntry> currentStates) Sets partial matches.
-
Constructor Details
-
RowRecogPartitionStateImpl
Ctor.- Parameters:
randomAccess
- for handling "prev" functions, if anyoptionalKeys
- keys for "partition", if any
-
RowRecogPartitionStateImpl
public RowRecogPartitionStateImpl(RowRecogPreviousStrategyImpl getter, List<RowRecogNFAStateEntry> currentStates) Ctor.- Parameters:
getter
- for "prev" accesscurrentStates
- existing state
-
RowRecogPartitionStateImpl
public RowRecogPartitionStateImpl(RowRecogPreviousStrategyImpl getter, List<RowRecogNFAStateEntry> currentStates, Object optionalKeys) Ctor.- Parameters:
getter
- for "prev" accesscurrentStates
- existing stateoptionalKeys
- partition keys if any
-
-
Method Details
-
getRandomAccess
Returns the random access for "prev".- Specified by:
getRandomAccess
in interfaceRowRecogPartitionState
- Returns:
- access
-
getCurrentStatesIterator
Returns partial matches.- Specified by:
getCurrentStatesIterator
in interfaceRowRecogPartitionState
- Returns:
- state
-
setCurrentStates
Sets partial matches.- Specified by:
setCurrentStates
in interfaceRowRecogPartitionState
- Parameters:
currentStates
- state to set
-
getOptionalKeys
Returns partition keys, if any.- Specified by:
getOptionalKeys
in interfaceRowRecogPartitionState
- Returns:
- keys
-
removeEventFromPrev
Remove an event from random access for "prev".- Parameters:
oldEvents
- to remove
-
removeEventFromPrev
Remove an event from random access for "prev".- Parameters:
oldEvent
- to remove
-
removeEventFromState
Remove an event from state.- Parameters:
oldEvent
- to remove- Returns:
- true for removed, false for not found
-
getNumStates
public int getNumStates()- Specified by:
getNumStates
in interfaceRowRecogPartitionState
-
clearCurrentStates
public void clearCurrentStates() -
getCurrentStatesForPrint
- Specified by:
getCurrentStatesForPrint
in interfaceRowRecogPartitionState
-
isEmptyCurrentState
public boolean isEmptyCurrentState()- Specified by:
isEmptyCurrentState
in interfaceRowRecogPartitionState
-
removeEventFromState
public static List<RowRecogNFAStateEntry> removeEventFromState(EventBean oldEvent, Iterator<RowRecogNFAStateEntry> states)
-