Class ScheduledExecution
- java.lang.Object
-
- org.eclipse.viatra.transformation.evm.api.ScheduledExecution
-
public class ScheduledExecution extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description ScheduledExecution(EventRealm eventRealm)
Creates an execution for the givenEventRealm
.ScheduledExecution(EventRealm eventRealm, Agenda agenda, IExecutor executor)
ScheduledExecution(RuleBase ruleBase, IExecutor executor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
dispose()
Disposes of the execution by disposing its ruleBase.protected void
endScheduling()
This method is called by schedule() to indicate that the firing strategy is finished its execution.IExecutor
getExecutor()
RuleBase
getRuleBase()
protected void
schedule()
protected boolean
startScheduling()
This method is called from schedule() to indicate that a new call was received.
-
-
-
Constructor Detail
-
ScheduledExecution
public ScheduledExecution(EventRealm eventRealm, Agenda agenda, IExecutor executor)
Creates an execution for the givenEventRealm
,Executor
andAgenda
. Executions are usually created as part of an ExecutionSchema through the EventDrivenVM.createExecutionSchema methods.- Parameters:
eventRealm
-executor
-agenda
-
-
ScheduledExecution
public ScheduledExecution(EventRealm eventRealm)
Creates an execution for the givenEventRealm
. Executions are usually created as part of an ExecutionSchema through the EventDrivenVM.createExecutionSchema methods.- Parameters:
eventRealm
-executor
-agenda
-
-
ScheduledExecution
public ScheduledExecution(RuleBase ruleBase, IExecutor executor)
Creates an execution for the givenExecutor
andRuleBase
. Executions are usually created as part of an ExecutionSchema through the EventDrivenVM.createExecutionSchema methods.- Parameters:
eventRealm
-executor
-ruleBase
-
-
-
Method Detail
-
getRuleBase
public RuleBase getRuleBase()
-
getExecutor
public IExecutor getExecutor()
-
schedule
protected void schedule()
-
startScheduling
protected boolean startScheduling()
This method is called from schedule() to indicate that a new call was received. If there is already scheduling in progress, that is logged and false is returned. Otherwise, a new scheduling starts, which is logged and stored.- Returns:
- true, if the firing strategy can start, false otherwise
-
endScheduling
protected void endScheduling()
This method is called by schedule() to indicate that the firing strategy is finished its execution. This is logged and the scheduling state is set to false.
-
dispose
protected void dispose()
Disposes of the execution by disposing its ruleBase.
-
-