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)
          Ctor.
 
Method Summary
 void accept(EventRowRegexNFAViewServiceVisitor visitor)
           
 RegexPartitionStateRepo copyForIterate()
          Copy state for iteration.
 RegexPartitionState 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.
 boolean isPartitioned()
           
 void 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)
           
 
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)
Ctor.

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

removeState

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

copyForIterate

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

Specified by:
copyForIterate in interface RegexPartitionStateRepo
Returns:
copied state

removeOld

public void 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 RegexPartitionState 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

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