com.espertech.esper.rowregex
Class RegexPartitionStateRepoGroup

java.lang.Object
  extended by com.espertech.esper.rowregex.RegexPartitionStateRepoGroup
All Implemented Interfaces:
RegexPartitionStateRepo

public class RegexPartitionStateRepoGroup
extends java.lang.Object
implements RegexPartitionStateRepo

Partition-by implementation for partition state.


Field Summary
static int INITIAL_COLLECTION_MIN
          Empty state collection initial threshold.
 
Constructor Summary
RegexPartitionStateRepoGroup(RegexPartitionStateRandomAccessGetter getter, RegexPartitionStateRepoGroupMeta meta, boolean keepScheduleState, RegexPartitionTerminationStateComparator terminationStateCompare)
          Ctor.
 
Method Summary
 void accept(EventRowRegexNFAViewServiceVisitor visitor)
           
 RegexPartitionStateRepo copyForIterate(boolean forOutOfOrderReprocessing)
          Copy state for iteration.
 void destroy()
           
static java.lang.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(java.lang.Object key)
          Return state for key or create state if not found.
 int getStateCount()
           
 java.util.Map<java.lang.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(java.lang.Object partitionKey)
           
 void setEventSequenceNum(int num)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INITIAL_COLLECTION_MIN

public static final int INITIAL_COLLECTION_MIN
Empty state collection initial threshold.

See Also:
Constant Field Values
Constructor Detail

RegexPartitionStateRepoGroup

public RegexPartitionStateRepoGroup(RegexPartitionStateRandomAccessGetter getter,
                                    RegexPartitionStateRepoGroupMeta meta,
                                    boolean keepScheduleState,
                                    RegexPartitionTerminationStateComparator terminationStateCompare)
Ctor.

Parameters:
getter - for "prev" function access
meta - general metadata for grouping
Method Detail

incrementAndGetEventSequenceNum

public int incrementAndGetEventSequenceNum()
Specified by:
incrementAndGetEventSequenceNum in interface RegexPartitionStateRepo

setEventSequenceNum

public void setEventSequenceNum(int num)
Specified by:
setEventSequenceNum in interface RegexPartitionStateRepo

getScheduleState

public RegexPartitionStateRepoScheduleState getScheduleState()
Specified by:
getScheduleState in interface RegexPartitionStateRepo

removeState

public void removeState(java.lang.Object partitionKey)
Specified by:
removeState in interface RegexPartitionStateRepo

copyForIterate

public RegexPartitionStateRepo copyForIterate(boolean forOutOfOrderReprocessing)
Description copied from interface: RegexPartitionStateRepo
Copy state for iteration.

Specified by:
copyForIterate in interface RegexPartitionStateRepo
Returns:
copied state

removeOld

public int removeOld(EventBean[] oldData,
                     boolean isEmpty,
                     boolean[] found)
Description copied from interface: RegexPartitionStateRepo
Remove old events from the state, applicable for "prev" function and partial NFA state.

Specified by:
removeOld in interface RegexPartitionStateRepo
Parameters:
oldData - to remove
isEmpty - indicator if there are not matches
found - indicator if any partial matches exist to be deleted

getState

public RegexPartitionState getState(java.lang.Object key)
Description copied from interface: RegexPartitionStateRepo
Return state for key or create state if not found.

Specified by:
getState in interface RegexPartitionStateRepo
Parameters:
key - to look up
Returns:
state

getState

public RegexPartitionStateImpl getState(EventBean theEvent,
                                        boolean isCollect)
Description copied from interface: RegexPartitionStateRepo
Return state for event or create state if not found.

Specified by:
getState in interface RegexPartitionStateRepo
Parameters:
theEvent - to look up
isCollect - true if a collection of unused state can occur
Returns:
state

accept

public void accept(EventRowRegexNFAViewServiceVisitor visitor)
Specified by:
accept in interface RegexPartitionStateRepo

isPartitioned

public boolean isPartitioned()
Specified by:
isPartitioned in interface RegexPartitionStateRepo

getStates

public java.util.Map<java.lang.Object,RegexPartitionStateImpl> getStates()

getStateCount

public int getStateCount()
Specified by:
getStateCount in interface RegexPartitionStateRepo

getKeys

public static java.lang.Object getKeys(EventBean theEvent,
                                       RegexPartitionStateRepoGroupMeta meta)

destroy

public void destroy()
Specified by:
destroy in interface RegexPartitionStateRepo

© 2006-2016 EsperTech Inc.
All rights reserved.
Visit us at espertech.com