Class 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

    public class ClosedWorkloadUser
    extends SimuComSimProcess
    implements IUser
    A closed workload user is a user which performs the typical closed workload cycle: execute, think, execute, ...
    • Field Detail

      • sessionId

        protected long sessionId
    • Constructor Detail

      • 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 to
        name - The users name
        scenarioRunner - The scenario runner determining the users behaviour
        thinkTimeSpec - A stoex which determines the users think time
        usageStartStopProbes -
    • Method Detail

      • scenarioRunner

        public void scenarioRunner​(SimuComSimProcess thread)
        Description copied from interface: IScenarioRunner
        Execute the behaviour represented by this object using the given simulation process
        Specified by:
        scenarioRunner in interface IScenarioRunner
        Parameters:
        thread - The simulation process used to execute the behaviour encapsulated in this object
      • startUserLife

        public void startUserLife()
        Description copied from interface: IUser
        Called by the framework to tell the user that he just was born and that he is now ready to conquer the world.
        Specified by:
        startUserLife in interface IUser
      • getRequestContext

        public org.palladiosimulator.probeframework.measurement.RequestContext getRequestContext()
        Returns the RequestContext in which this simulated process is executed.

        A closed workload user runs through his lifecycle several times in series. Each time the same SimuComSimProcess is 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:
        getRequestContext in class SimuComSimProcess
        Returns:
        the request context
      • requestStop

        public void requestStop()
      • setThinkTime

        public void setThinkTime​(String newThinkTimeSpec)