Class ClosedWorkloadUser
java.lang.Object
de.uka.ipd.sdq.simulation.abstractsimengine.SimulationElement
de.uka.ipd.sdq.simulation.abstractsimengine.AbstractSimEntityDelegator
de.uka.ipd.sdq.simulation.abstractsimengine.AbstractSimProcessDelegator
de.uka.ipd.sdq.simucomframework.SimuComSimProcess
de.uka.ipd.sdq.simucomframework.usage.ClosedWorkloadUser
- All Implemented Interfaces:
de.uka.ipd.sdq.scheduler.ISchedulableProcess,IScenarioRunner,IUser,de.uka.ipd.sdq.simulation.abstractsimengine.IEntity,de.uka.ipd.sdq.simulation.abstractsimengine.ISimProcess,de.uka.ipd.sdq.simulation.abstractsimengine.ISimProcessListener
A closed workload user is a user which performs the typical closed workload cycle: execute,
think, execute, ...
-
Field Summary
FieldsFields inherited from class de.uka.ipd.sdq.simucomframework.SimuComSimProcess
currentSessionIdFields inherited from interface de.uka.ipd.sdq.simulation.abstractsimengine.IEntity
NULL -
Constructor Summary
ConstructorsConstructorDescriptionClosedWorkloadUser(SimuComModel owner, String name, IScenarioRunner scenarioRunner, String thinkTimeSpec, List<org.palladiosimulator.probeframework.probes.Probe> usageStartStopProbes, de.uka.ipd.sdq.scheduler.resources.active.IResourceTableManager resourceTableManager) Constructor of the closed workload user -
Method Summary
Modifier and TypeMethodDescriptionorg.palladiosimulator.probeframework.measurement.RequestContextReturns theRequestContextin which this simulated process is executed.protected voidvoidvoidscenarioRunner(SimuComSimProcess thread) Execute the behaviour represented by this object using the given simulation processvoidsetThinkTime(String newThinkTimeSpec) voidCalled by the framework to tell the user that he just was born and that he is now ready to conquer the world.Methods inherited from class de.uka.ipd.sdq.simucomframework.SimuComSimProcess
activate, addProcessToSimStatus, addTerminatedObserver, fireTerminated, getCurrentSessionId, getModel, getPriority, getRootProcess, getSimProcessStatus, hold, isFinished, lifeCycle, notifyResuming, notifySuspending, notifyTerminated, removeProcessFromSimStatus, removeTerminatedObserver, setPriority, timeout, updateNewSessionIDMethods inherited from class de.uka.ipd.sdq.simulation.abstractsimengine.AbstractSimProcessDelegator
addProcessListener, getId, getRawId, isTerminated, passivate, passivate, preempt, removeProcessListener, scheduleAtMethods inherited from class de.uka.ipd.sdq.simulation.abstractsimengine.AbstractSimEntityDelegator
getEncapsulatedEntity, isScheduled, rescheduleMethods inherited from class de.uka.ipd.sdq.simulation.abstractsimengine.SimulationElement
getNameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.uka.ipd.sdq.simulation.abstractsimengine.IEntity
isScheduled, rescheduleMethods inherited from interface de.uka.ipd.sdq.scheduler.ISchedulableProcess
getId, passivate
-
Field Details
-
sessionId
protected long sessionId
-
-
Constructor Details
-
ClosedWorkloadUser
public ClosedWorkloadUser(SimuComModel owner, String name, IScenarioRunner scenarioRunner, String thinkTimeSpec, List<org.palladiosimulator.probeframework.probes.Probe> usageStartStopProbes, de.uka.ipd.sdq.scheduler.resources.active.IResourceTableManager resourceTableManager) Constructor of the closed workload user- Parameters:
owner- The model this user belongs toname- The users namescenarioRunner- The scenario runner determining the users behaviourthinkTimeSpec- A stoex which determines the users think timeusageStartStopProbes-
-
-
Method Details
-
internalLifeCycle
protected void internalLifeCycle()- Specified by:
internalLifeCyclein classSimuComSimProcess
-
scenarioRunner
Description copied from interface:IScenarioRunnerExecute the behaviour represented by this object using the given simulation process- Specified by:
scenarioRunnerin interfaceIScenarioRunner- Parameters:
thread- The simulation process used to execute the behaviour encapsulated in this object
-
startUserLife
public void startUserLife()Description copied from interface:IUserCalled by the framework to tell the user that he just was born and that he is now ready to conquer the world.- Specified by:
startUserLifein interfaceIUser
-
getRequestContext
public org.palladiosimulator.probeframework.measurement.RequestContext getRequestContext()Returns theRequestContextin which this simulated process is executed.A closed workload user runs through his lifecycle several times in series. Each time the same
SimuComSimProcessis used. In order to be able to distinguish between the different runs, the request context id gets concatenated with the run count. The run counts represents how often the lifecycle has been executed. Thus the returned ID is unique for each run through the lifecycle.- Overrides:
getRequestContextin classSimuComSimProcess- Returns:
- the request context
-
requestStop
public void requestStop() -
setThinkTime
-