|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.core.runtime.PlatformObject
org.eclipse.core.internal.jobs.InternalJob
org.eclipse.core.runtime.jobs.Job
de.cau.cs.kieler.sim.kiem.execution.Execution
public class Execution
The Class Execution. This is the base class for the whole execution. It creates and manages the worker threads for pure observer and pure producer components. It also implements the scheduling between all components. Additionally it manages a timeout component that checks whether a component-method exceeds the maximum timeout and then terminates all executions w/ an error log message.
Field Summary |
---|
Fields inherited from class org.eclipse.core.runtime.jobs.Job |
---|
ASYNC_FINISH, BUILD, DECORATE, INTERACTIVE, LONG, NONE, RUNNING, SHORT, SLEEPING, WAITING |
Fields inherited from class org.eclipse.core.internal.jobs.InternalJob |
---|
manager |
Constructor Summary | |
---|---|
Execution(List<DataComponentWrapper> dataComponentWrapperListParam,
EventManager eventManagerParam)
Instantiates and starts a new execution (thread). |
Method Summary | |
---|---|
void |
abortExecutionAsync()
Aborts the execution. |
void |
errorTerminate()
Terminates the execution in case of an error. |
protected void |
finalize()
|
int |
getAimedStepDuration()
Gets the last set and currently used aimed step duration. |
int |
getAverageStepDuration()
Gets the measured average step duration. |
JSONDataPool |
getDataPool()
Gets the data pool. |
long |
getExecutionDuration()
Gets the execution duration. |
IProgressMonitor |
getExecutionProgressMonitor()
Gets the progress monitor.that the user may have canceled. |
long |
getExecutionStartTime()
Gets the execution start time. |
int |
getMaximumStepDuration()
Gets the measured maximum step duration. |
long |
getMaximumSteps()
Gets the maximum step. |
int |
getMinimumStepDuration()
Gets the measured minimum step duration. |
int |
getStepDuration()
Gets the currently set aimed step duration. |
long |
getSteps()
Gets the current step. |
int |
getWeightedAverageStepDuration()
Gets the measured weighted average step duration. |
boolean |
isHistoryStep()
Checks whether the current step is a history step. |
boolean |
isPaused()
Only returns true if no more steps have to be done (forward AND backward). |
boolean |
isRunning()
Checks if the execution is in run mode. |
boolean |
isStarted()
Checks whether isStarted is true. |
void |
macroStepExecutionSync()
Macro step execution sync. |
void |
pauseExecutionSync()
Pauses the execution. |
protected IStatus |
run(IProgressMonitor monitor)
Run. |
boolean |
runExecutionPause(long step)
Run execution to the specific, user defined step number and pause. |
void |
runExecutionSync()
Runs the execution. |
void |
setAimedStepDuration(int aimedStepDurationParam)
Sets the aimed step duration. |
void |
showError(String textMessage,
String pluginID,
Exception e)
A proxy method for showing an error from within an ObserverExecution , a. |
void |
showWarning(String textMessage,
String pluginID,
Exception e)
A proxy method for showing a warning from within an ObserverExecution , a. |
boolean |
stepBackExecutionSync()
Make a backward execution step. |
boolean |
stepExecutionPause(long step)
Step execution to the specific, user defined step number and pause. |
boolean |
stepExecutionSync()
Make a forward execution step. |
void |
stopExecutionSync()
Stops the execution. |
void |
wrapupComponents(boolean quietmode)
Wrap-up components after execution was stopped. |
Methods inherited from class org.eclipse.core.runtime.jobs.Job |
---|
addJobChangeListener, belongsTo, cancel, canceling, done, getJobManager, getName, getPriority, getProperty, getResult, getRule, getState, getThread, isBlocking, isSystem, isUser, join, removeJobChangeListener, schedule, schedule, setName, setPriority, setProgressGroup, setProperty, setRule, setSystem, setThread, setUser, shouldRun, shouldSchedule, sleep, toString, wakeUp, wakeUp, yieldRule |
Methods inherited from class org.eclipse.core.internal.jobs.InternalJob |
---|
compareTo |
Methods inherited from class org.eclipse.core.runtime.PlatformObject |
---|
getAdapter |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.eclipse.core.runtime.IAdaptable |
---|
getAdapter |
Constructor Detail |
---|
public Execution(List<DataComponentWrapper> dataComponentWrapperListParam, EventManager eventManagerParam)
dataComponentWrapperListParam
- the current DataComponentWrappereventManagerParam
- the evenet manager paramMethod Detail |
---|
public boolean isStarted()
public JSONDataPool getDataPool()
public int getStepDuration()
public int getMaximumStepDuration()
public int getMinimumStepDuration()
public int getWeightedAverageStepDuration()
public int getAverageStepDuration()
public long getExecutionStartTime()
public long getExecutionDuration()
public long getSteps()
public long getMaximumSteps()
getSteps()
), unless the current step is a history step.public boolean isHistoryStep()
public void setAimedStepDuration(int aimedStepDurationParam)
aimedStepDurationParam
- the new aimed step durationpublic int getAimedStepDuration()
public boolean stepExecutionPause(long step)
step
- the step to jump/run to
public boolean runExecutionPause(long step)
step
- the step to jump/run to
public boolean stepBackExecutionSync()
public boolean stepExecutionSync()
public void macroStepExecutionSync()
public void pauseExecutionSync()
NO_STEPS
the DataComponents are
informed about the pause command.
public void runExecutionSync()
run(IProgressMonitor)
method. Before
that is done the DataComponents are informed about the run command.
public void stopExecutionSync()
public void abortExecutionAsync()
public boolean isPaused()
public boolean isRunning()
public void errorTerminate()
protected void finalize()
finalize
in class Object
public void wrapupComponents(boolean quietmode)
quietmode
- the quietmode ommits any errorspublic IProgressMonitor getExecutionProgressMonitor()
protected IStatus run(IProgressMonitor monitor)
run
in class Job
monitor
- the monitor
public void showError(String textMessage, String pluginID, Exception e)
ObserverExecution
, a.
textMessage
- the text message to displaypluginID
- the plug-in ide
- the original Exception ProducerExecution
or the TimeoutThread
.public void showWarning(String textMessage, String pluginID, Exception e)
ObserverExecution
, a.
textMessage
- the text message to displaypluginID
- the plug-in ide
- the original Exception ProducerExecution
or the TimeoutThread
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |