public class RegexPartitionStateRepoGroup extends Object implements RegexPartitionStateRepo
Modifier and Type | Field and Description |
---|---|
static int |
INITIAL_COLLECTION_MIN
Empty state collection initial threshold.
|
Constructor and Description |
---|
RegexPartitionStateRepoGroup(RegexPartitionStateRandomAccessGetter getter,
RegexPartitionStateRepoGroupMeta meta,
boolean keepScheduleState,
RegexPartitionTerminationStateComparator terminationStateCompare) |
Modifier and Type | Method and Description |
---|---|
void |
accept(EventRowRegexNFAViewServiceVisitor visitor) |
RegexPartitionStateRepo |
copyForIterate(boolean forOutOfOrderReprocessing)
Copy state for iteration.
|
void |
destroy() |
static Object |
getKeys(EventBean theEvent,
RegexPartitionStateRepoGroupMeta meta) |
RegexPartitionStateRepoScheduleState |
getScheduleState() |
RegexPartitionStateImpl |
getState(EventBean theEvent,
boolean isCollect)
Return state for event or create state if not found.
|
RegexPartitionState |
getState(Object key)
Return state for key or create state if not found.
|
int |
getStateCount() |
Map<Object,RegexPartitionStateImpl> |
getStates() |
int |
incrementAndGetEventSequenceNum() |
boolean |
isPartitioned() |
int |
removeOld(EventBean[] oldData,
boolean isEmpty,
boolean[] found)
Remove old events from the state, applicable for "prev" function and partial NFA state.
|
void |
removeState(Object partitionKey) |
void |
setEventSequenceNum(int num) |
public static final int INITIAL_COLLECTION_MIN
public RegexPartitionStateRepoGroup(RegexPartitionStateRandomAccessGetter getter, RegexPartitionStateRepoGroupMeta meta, boolean keepScheduleState, RegexPartitionTerminationStateComparator terminationStateCompare)
public int incrementAndGetEventSequenceNum()
incrementAndGetEventSequenceNum
in interface RegexPartitionStateRepo
public void setEventSequenceNum(int num)
setEventSequenceNum
in interface RegexPartitionStateRepo
public RegexPartitionStateRepoScheduleState getScheduleState()
getScheduleState
in interface RegexPartitionStateRepo
public void removeState(Object partitionKey)
removeState
in interface RegexPartitionStateRepo
public RegexPartitionStateRepo copyForIterate(boolean forOutOfOrderReprocessing)
RegexPartitionStateRepo
copyForIterate
in interface RegexPartitionStateRepo
forOutOfOrderReprocessing
- indicator whether we are processing out-of-order eventspublic int removeOld(EventBean[] oldData, boolean isEmpty, boolean[] found)
RegexPartitionStateRepo
removeOld
in interface RegexPartitionStateRepo
oldData
- to removeisEmpty
- indicator if there are not matchesfound
- indicator if any partial matches exist to be deletedpublic RegexPartitionState getState(Object key)
RegexPartitionStateRepo
getState
in interface RegexPartitionStateRepo
key
- to look uppublic RegexPartitionStateImpl getState(EventBean theEvent, boolean isCollect)
RegexPartitionStateRepo
getState
in interface RegexPartitionStateRepo
theEvent
- to look upisCollect
- true if a collection of unused state can occurpublic void accept(EventRowRegexNFAViewServiceVisitor visitor)
accept
in interface RegexPartitionStateRepo
public boolean isPartitioned()
isPartitioned
in interface RegexPartitionStateRepo
public Map<Object,RegexPartitionStateImpl> getStates()
public int getStateCount()
getStateCount
in interface RegexPartitionStateRepo
public static Object getKeys(EventBean theEvent, RegexPartitionStateRepoGroupMeta meta)
public void destroy()
destroy
in interface RegexPartitionStateRepo