com.espertech.esper.rowregex
Class RegexPartitionState

java.lang.Object
  extended by com.espertech.esper.rowregex.RegexPartitionState

public class RegexPartitionState
extends java.lang.Object

All current state holding partial NFA matches.


Constructor Summary
RegexPartitionState(RegexPartitionStateRandomAccessGetter getter, java.util.List<RegexNFAStateEntry> currentStates, boolean hasInterval)
          Ctor.
RegexPartitionState(RegexPartitionStateRandomAccessGetter getter, java.util.List<RegexNFAStateEntry> currentStates, java.lang.Object optionalKeys, boolean hasInterval)
          Ctor.
RegexPartitionState(RegexPartitionStateRandomAccessImpl randomAccess, java.lang.Object optionalKeys, boolean hasInterval)
          Ctor.
 
Method Summary
 void addCallbackItem(RegexNFAStateEntry endState)
          Add a callback item for intervals.
 java.util.List<RegexNFAStateEntry> getCallbackItems()
          Returns the interval states, if any.
 java.util.List<RegexNFAStateEntry> getCurrentStates()
          Returns partial matches.
 java.lang.Integer getNumIntervalCallbackItems()
           
 int getNumStates()
           
 java.lang.Object getOptionalKeys()
          Returns partition keys, if any.
 RegexPartitionStateRandomAccessImpl getRandomAccess()
          Returns the random access for "prev".
 boolean isCallbackScheduled()
          Returns indicator if callback is schedule.
 void removeEventFromPrev(EventBean oldEvent)
          Remove an event from random access for "prev".
 void removeEventFromPrev(EventBean[] oldEvents)
          Remove an event from random access for "prev".
 boolean removeEventFromState(EventBean oldEvent)
          Remove an event from state.
 void setCallbackScheduled(boolean callbackScheduled)
          Returns indicator if callback is schedule.
 void setCurrentStates(java.util.List<RegexNFAStateEntry> currentStates)
          Sets partial matches.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegexPartitionState

public RegexPartitionState(RegexPartitionStateRandomAccessImpl randomAccess,
                           java.lang.Object optionalKeys,
                           boolean hasInterval)
Ctor.

Parameters:
randomAccess - for handling "prev" functions, if any
optionalKeys - keys for "partition", if any
hasInterval - true if an interval is provided

RegexPartitionState

public RegexPartitionState(RegexPartitionStateRandomAccessGetter getter,
                           java.util.List<RegexNFAStateEntry> currentStates,
                           boolean hasInterval)
Ctor.

Parameters:
getter - for "prev" access
currentStates - existing state
hasInterval - true for interval

RegexPartitionState

public RegexPartitionState(RegexPartitionStateRandomAccessGetter getter,
                           java.util.List<RegexNFAStateEntry> currentStates,
                           java.lang.Object optionalKeys,
                           boolean hasInterval)
Ctor.

Parameters:
getter - for "prev" access
currentStates - existing state
optionalKeys - partition keys if any
hasInterval - true for interval
Method Detail

getRandomAccess

public RegexPartitionStateRandomAccessImpl getRandomAccess()
Returns the random access for "prev".

Returns:
access

getCurrentStates

public java.util.List<RegexNFAStateEntry> getCurrentStates()
Returns partial matches.

Returns:
state

setCurrentStates

public void setCurrentStates(java.util.List<RegexNFAStateEntry> currentStates)
Sets partial matches.

Parameters:
currentStates - state to set

getOptionalKeys

public java.lang.Object getOptionalKeys()
Returns partition keys, if any.

Returns:
keys

removeEventFromPrev

public void removeEventFromPrev(EventBean[] oldEvents)
Remove an event from random access for "prev".

Parameters:
oldEvents - to remove

removeEventFromPrev

public void removeEventFromPrev(EventBean oldEvent)
Remove an event from random access for "prev".

Parameters:
oldEvent - to remove

removeEventFromState

public boolean removeEventFromState(EventBean oldEvent)
Remove an event from state.

Parameters:
oldEvent - to remove
Returns:
true for removed, false for not found

getCallbackItems

public java.util.List<RegexNFAStateEntry> getCallbackItems()
Returns the interval states, if any.

Returns:
interval states

isCallbackScheduled

public boolean isCallbackScheduled()
Returns indicator if callback is schedule.

Returns:
scheduled indicator

setCallbackScheduled

public void setCallbackScheduled(boolean callbackScheduled)
Returns indicator if callback is schedule.

Parameters:
callbackScheduled - true if scheduled

addCallbackItem

public void addCallbackItem(RegexNFAStateEntry endState)
Add a callback item for intervals.

Parameters:
endState - to add

getNumStates

public int getNumStates()

getNumIntervalCallbackItems

public java.lang.Integer getNumIntervalCallbackItems()

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