|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.umass.cs.sase.engine.Engine
public class Engine
This is the processing engine.
Constructor Summary | |
---|---|
Engine()
The default constructor. |
Method Summary | |
---|---|
void |
addEventToRun(Run r,
Event e)
This method adds an event to a run |
void |
addEventToRunForNegation(Run r,
Event e)
This method adds an event to a run, for queries with a negation component. |
void |
addRunByPartition(Run newRun)
This methods add a new run to a partition. |
boolean |
checkNegation(Event e)
|
boolean |
checkPartition(Event e,
Run r)
Checks whether the event satisfies the partition of a run, only used under partition-contiguity selection strategy |
boolean |
checkPredicate(Event e,
Run r)
Checks whether the event satisfies the predicates of a run |
int |
checkPredicateOptimized(Event e,
Run r)
Checks the predicate for e against r |
boolean |
checkProceed(Run r)
Checks whether a kleene closure state can proceed to the next state |
boolean |
checkProceedOptimized(Event e,
Run r)
Checks whether the run needs to proceed if we add e to r |
boolean |
checkTimeWindow(Event e,
Run r)
Checks whether the event satisfies the time window constraint of a run |
void |
cleanRuns()
Cleans useless runs |
void |
cleanRunsByPartition()
Cleans useless runs by partition. |
Run |
cloneRun(Run r)
Clones a run |
void |
createNewRun(Event e)
Creates a new run containing the input event. |
void |
createNewRunByPartition(Event e)
Creates a new run containing the input event and adds the new run to the corresponding partition |
void |
deleteRunsOverTimeWindow(int currentTime,
int timeWindow,
int delayTime)
Deletes runs violating the time window |
void |
evaluateEventForNegation(Event e,
Run r)
This method evaluates an event against a run, for queries with a negation component. |
void |
evaluateEventForPartitonContiguity(Event e,
Run r)
This method evaluates an event against a run. |
void |
evaluateEventForPartitonContiguityOptimized(Event e,
Run r)
If the selection strategy is partition-contiguity, this method is called, and it evaluates the event for a given run |
void |
evaluateEventForSkipTillAny(Event e,
Run r)
This method evaluates an event against a run, for skip-till-any-match |
void |
evaluateEventForSkipTillNext(Event e,
Run r)
This method evaluates an event against a run, for skip-till-next-match |
void |
evaluateEventOptimizedForNegation(Event e,
Run r)
This method evaluates the event for a given run, for queries with a negation component. |
void |
evaluateEventOptimizedForSkipTillAny(Event e,
Run r)
This method evaluates the event for a given run, for skip-till-any-match |
void |
evaluateEventOptimizedForSkipTillNext(Event e,
Run r)
This method evaluates the event for a given run, for skip-till-next-match. |
void |
evaluateRunsByPartitionForNegation(Event e)
This method will iterate runs in the same partition for the current event, for queries with a negation component. |
void |
evaluateRunsByPartitionForSkipTillAny(Event e)
This method will iterate runs in the same partition for the current event, for skip-till-any-match |
void |
evaluateRunsByPartitionForSkipTillNext(Event e)
This method will iterate runs in the same partition for the current event, for skip-till-next-match |
void |
evaluateRunsForNegation(Event e)
This method will iterate all existing runs for the current event, for queries with a negation component. |
void |
evaluateRunsForPartitionContiguity(Event e)
If the selection strategy is partition-contiguity, this method is called and it will iterate runs in the same partition for the current event |
void |
evaluateRunsForSkipTillAny(Event e)
This method will iterate all existing runs for the current event, for skip-till-any-match. |
void |
evaluateRunsForSkipTillNext(Event e)
This method will iterate all existing runs for the current event, for skip-till-next-match. |
java.util.ArrayList<Run> |
getActiveRuns()
|
java.util.HashMap<java.lang.Integer,java.util.ArrayList<Run>> |
getActiveRunsByPartition()
|
java.util.HashMap<java.lang.Integer,java.util.ArrayList<Run>> |
getActiveRunsByPartiton()
|
EventBuffer |
getBuffer()
|
RunPool |
getEngineRunController()
|
Stream |
getInput()
|
MatchController |
getMatches()
|
java.util.ArrayList<Event> |
getNegationEvents()
|
java.util.HashMap<java.lang.Integer,java.util.ArrayList<Event>> |
getNegationEventsByPartition()
|
NFA |
getNfa()
|
java.util.ArrayList<Run> |
getToDeleteRuns()
|
void |
indexNegationByPartition(Event e)
|
void |
initialize()
This method initializes the engine. |
void |
outputMatch(Match m)
Outputs a match, and profiles. |
void |
outputMatchByPartitionForNegation(Match m,
Run r)
Outputs a match, and profiles, for queries with a negation componengt, with a partition attribute. |
void |
outputMatchForNegation(Match m,
Run r)
Outputs a match, and profiles, for queries with a negation componengt, without a partition attribute. |
void |
runEngine()
This is the main run logic method |
void |
runNegationEngine()
The main method when there is a negation component in the query |
void |
runPartitionContiguityEngine()
This method is called when the query uses the partition-contiguity selection strategy |
void |
runSkipTillAnyEngine()
The main method for skip-till-any-match |
void |
runSkipTillNextEngine()
The main method for skip-till-next-match |
boolean |
searchNegation(int beforeTimestamp,
int afterTimestamp,
java.util.ArrayList<Event> list)
|
boolean |
searchNegationByPartition(int beforeTimestamp,
int afterTimestamp,
int partitionId)
|
void |
setActiveRuns(java.util.ArrayList<Run> activeRuns)
|
void |
setActiveRunsByPartition(java.util.HashMap<java.lang.Integer,java.util.ArrayList<Run>> activeRunsByPartition)
|
void |
setActiveRunsByPartiton(java.util.HashMap<java.lang.Integer,java.util.ArrayList<Run>> activeRunsByPartiton)
|
void |
setBuffer(EventBuffer buffer)
|
void |
setEngineRunController(RunPool engineRunController)
|
void |
setInput(Stream input)
|
void |
setMatches(MatchController matches)
|
void |
setNegationEvents(java.util.ArrayList<Event> negationEvents)
|
void |
setNegationEventsByPartition(java.util.HashMap<java.lang.Integer,java.util.ArrayList<Event>> negationEventsByPartition)
|
void |
setNfa(NFA nfa)
|
void |
setToDeleteRuns(java.util.ArrayList<Run> toDeleteRuns)
|
void |
warmUp()
This method is used to warm up the engine. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Engine()
Method Detail |
---|
public void initialize()
public void warmUp() throws java.lang.CloneNotSupportedException, net.sourceforge.jeval.EvaluationException
java.lang.CloneNotSupportedException
net.sourceforge.jeval.EvaluationException
public void runEngine() throws java.lang.CloneNotSupportedException, net.sourceforge.jeval.EvaluationException
java.lang.CloneNotSupportedException
net.sourceforge.jeval.EvaluationException
public void runSkipTillAnyEngine() throws java.lang.CloneNotSupportedException, net.sourceforge.jeval.EvaluationException
java.lang.CloneNotSupportedException
net.sourceforge.jeval.EvaluationException
public void runSkipTillNextEngine() throws java.lang.CloneNotSupportedException, net.sourceforge.jeval.EvaluationException
java.lang.CloneNotSupportedException
net.sourceforge.jeval.EvaluationException
public void runPartitionContiguityEngine() throws net.sourceforge.jeval.EvaluationException, java.lang.CloneNotSupportedException
java.lang.CloneNotSupportedException
net.sourceforge.jeval.EvaluationException
public void runNegationEngine() throws java.lang.CloneNotSupportedException, net.sourceforge.jeval.EvaluationException
java.lang.CloneNotSupportedException
net.sourceforge.jeval.EvaluationException
public void evaluateRunsForSkipTillAny(Event e) throws java.lang.CloneNotSupportedException, net.sourceforge.jeval.EvaluationException
e
- The current event which is being evaluated.
java.lang.CloneNotSupportedException
net.sourceforge.jeval.EvaluationException
public void evaluateRunsForSkipTillNext(Event e) throws java.lang.CloneNotSupportedException, net.sourceforge.jeval.EvaluationException
e
- The current event which is being evaluated.
java.lang.CloneNotSupportedException
net.sourceforge.jeval.EvaluationException
public void evaluateRunsForNegation(Event e) throws java.lang.CloneNotSupportedException, net.sourceforge.jeval.EvaluationException
e
- The current event which is being evaluated.
java.lang.CloneNotSupportedException
net.sourceforge.jeval.EvaluationException
public void evaluateRunsByPartitionForSkipTillAny(Event e) throws java.lang.CloneNotSupportedException
e
- The current event which is being evaluated.
java.lang.CloneNotSupportedException
public void evaluateRunsByPartitionForSkipTillNext(Event e) throws java.lang.CloneNotSupportedException
e
- The current event which is being evaluated.
java.lang.CloneNotSupportedException
public void evaluateRunsByPartitionForNegation(Event e) throws java.lang.CloneNotSupportedException
e
- The current event which is being evaluated.
java.lang.CloneNotSupportedException
public void evaluateRunsForPartitionContiguity(Event e) throws java.lang.CloneNotSupportedException
e
- The current event which is being evaluated.
java.lang.CloneNotSupportedException
public void evaluateEventOptimizedForSkipTillAny(Event e, Run r) throws java.lang.CloneNotSupportedException
e
- The current event which is being evaluated.r
- The run against which the evaluation goes
java.lang.CloneNotSupportedException
public void evaluateEventOptimizedForSkipTillNext(Event e, Run r)
e
- The current event which is being evaluated.r
- The run against which the evaluation goespublic void evaluateEventOptimizedForNegation(Event e, Run r) throws java.lang.CloneNotSupportedException
e
- The current event which is being evaluated.r
- The run against which the evaluation goes
java.lang.CloneNotSupportedException
public void evaluateEventForPartitonContiguityOptimized(Event e, Run r) throws java.lang.CloneNotSupportedException
e
- The current event which is being evaluatedr
- The run against which the evaluation goes
java.lang.CloneNotSupportedException
public void evaluateEventForSkipTillAny(Event e, Run r) throws java.lang.CloneNotSupportedException
e
- The event which is being evaluated.r
- The run which the event is being evaluated against.
java.lang.CloneNotSupportedException
public void evaluateEventForSkipTillNext(Event e, Run r) throws java.lang.CloneNotSupportedException
e
- The event which is being evaluated.r
- The run which the event is being evaluated against.
java.lang.CloneNotSupportedException
public void evaluateEventForNegation(Event e, Run r) throws java.lang.CloneNotSupportedException
e
- The event which is being evaluated.r
- The run which the event is being evaluated against.
java.lang.CloneNotSupportedException
public void addRunByPartition(Run newRun)
newRun
- The run to be addedpublic void evaluateEventForPartitonContiguity(Event e, Run r) throws java.lang.CloneNotSupportedException
e
- The event which is being evaluated.r
- The run which the event is being evaluated against.
java.lang.CloneNotSupportedException
public void addEventToRun(Run r, Event e)
r
- The event to be addede
- The run to which the event is addedpublic void addEventToRunForNegation(Run r, Event e)
r
- The event to be addede
- The run to which the event is addedpublic void createNewRun(Event e) throws net.sourceforge.jeval.EvaluationException
e
- The current event.
net.sourceforge.jeval.EvaluationException
public void createNewRunByPartition(Event e) throws net.sourceforge.jeval.EvaluationException, java.lang.CloneNotSupportedException
e
- The current event
net.sourceforge.jeval.EvaluationException
java.lang.CloneNotSupportedException
public int checkPredicateOptimized(Event e, Run r)
e
- The current eventr
- The run against which e is evaluated
public boolean checkProceedOptimized(Event e, Run r)
e
- The current eventr
- The run against which e is evaluated
public boolean checkPredicate(Event e, Run r)
e
- the current eventr
- the current run
public boolean checkPartition(Event e, Run r)
e
- the current eventr
- the current run
public boolean checkProceed(Run r)
r
- the current run
public boolean checkNegation(Event e) throws net.sourceforge.jeval.EvaluationException
net.sourceforge.jeval.EvaluationException
public void indexNegationByPartition(Event e)
public boolean searchNegation(int beforeTimestamp, int afterTimestamp, java.util.ArrayList<Event> list)
public boolean searchNegationByPartition(int beforeTimestamp, int afterTimestamp, int partitionId)
public Run cloneRun(Run r) throws java.lang.CloneNotSupportedException
r
- the run to be cloned
java.lang.CloneNotSupportedException
public boolean checkTimeWindow(Event e, Run r)
e
- the current eventr
- the current run
public void outputMatch(Match m)
m
- the match to be outputpublic void outputMatchForNegation(Match m, Run r)
m
- the match to be outputpublic void outputMatchByPartitionForNegation(Match m, Run r)
m
- the match to be outputpublic void deleteRunsOverTimeWindow(int currentTime, int timeWindow, int delayTime)
currentTime
- current timetimeWindow
- time window of the querydelayTime
- specified delay period, any run which has been past the time window by this value would be deleted.public void cleanRuns()
public void cleanRunsByPartition()
public Stream getInput()
public void setInput(Stream input)
input
- the input to setpublic EventBuffer getBuffer()
public void setBuffer(EventBuffer buffer)
buffer
- the buffer to setpublic NFA getNfa()
public void setNfa(NFA nfa)
nfa
- the nfa to setpublic RunPool getEngineRunController()
public void setEngineRunController(RunPool engineRunController)
engineRunController
- the engineRunController to setpublic java.util.ArrayList<Run> getActiveRuns()
public void setActiveRuns(java.util.ArrayList<Run> activeRuns)
activeRuns
- the activeRuns to setpublic MatchController getMatches()
public void setMatches(MatchController matches)
matches
- the matches to setpublic java.util.ArrayList<Run> getToDeleteRuns()
public void setToDeleteRuns(java.util.ArrayList<Run> toDeleteRuns)
toDeleteRuns
- the toDeleteRuns to setpublic java.util.HashMap<java.lang.Integer,java.util.ArrayList<Run>> getActiveRunsByPartiton()
public void setActiveRunsByPartiton(java.util.HashMap<java.lang.Integer,java.util.ArrayList<Run>> activeRunsByPartiton)
activeRunsByPartiton
- the activeRunsByPartiton to setpublic java.util.HashMap<java.lang.Integer,java.util.ArrayList<Run>> getActiveRunsByPartition()
public void setActiveRunsByPartition(java.util.HashMap<java.lang.Integer,java.util.ArrayList<Run>> activeRunsByPartition)
activeRunsByPartition
- the activeRunsByPartition to setpublic java.util.ArrayList<Event> getNegationEvents()
public void setNegationEvents(java.util.ArrayList<Event> negationEvents)
negationEvents
- the negationEvents to setpublic java.util.HashMap<java.lang.Integer,java.util.ArrayList<Event>> getNegationEventsByPartition()
public void setNegationEventsByPartition(java.util.HashMap<java.lang.Integer,java.util.ArrayList<Event>> negationEventsByPartition)
negationEventsByPartition
- the negationEventsByPartition to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |