Class User

  • All Implemented Interfaces:
    de.uka.ipd.sdq.simulation.abstractsimengine.IEntity, IUser

    public class User
    extends EventSimEntity
    implements IUser
    This entity represents a user of the system under simulation. Users issue system calls while traversing a usage scenario. They are spawned by a WorkloadGenerator.
    See Also:
    • Constructor Detail

      • User

        public User​(de.uka.ipd.sdq.simulation.abstractsimengine.ISimulationModel model,
                    org.palladiosimulator.pcm.usagemodel.UsageScenario scenario)
        Constructs a new User that is supposed to traverse the specified usage scenario.
        model - the simulation model
        scenario - the usage scenario
    • Method Detail

      • getId

        public String getId()
        Specified by:
        getId in interface IUser
        the unique identifier of this user
      • getUsageScenario

        public org.palladiosimulator.pcm.usagemodel.UsageScenario getUsageScenario()
        Returns the usage scenario that is to be executed by this User.
        Specified by:
        getUsageScenario in interface IUser
        the usage scenario
      • getUserState

        public EntityState<org.palladiosimulator.pcm.usagemodel.AbstractUserAction> getUserState()
      • getStochasticExpressionContext

        public de.uka.ipd.sdq.simucomframework.variables.StackContext getStochasticExpressionContext()
        Specified by:
        getStochasticExpressionContext in interface IUser
      • enterScenarioBehaviour

        public void enterScenarioBehaviour​(org.palladiosimulator.pcm.usagemodel.ScenarioBehaviour behaviour,
                                           Procedure onFinishCallback)
      • leaveScenarioBehaviour

        public void leaveScenarioBehaviour()
      • delay

        public void delay​(double waitingTime,
                          Procedure onResumeCallback)
      • simulateAction

        public void simulateAction​(org.palladiosimulator.pcm.usagemodel.AbstractUserAction action)
      • simulateBehaviour

        public void simulateBehaviour​(org.palladiosimulator.pcm.usagemodel.ScenarioBehaviour behaviour,
                                      Procedure onCompletionCallback)
        Simulates the given behaviour by simulating the nested chain of actions. If these actions contain further ScenarioBehaviours, these are simulated as well (and so on, recursively).

        Once the entire behaviour has been simulated, the given callback will be invoked.

        When this method returns, there is no guarantee whether the behaviour has been simulated or not.

        behaviour - the behaviour to be simulated
        onCompletionCallback - will be invoked once the behaviour has been simulated completely
      • notifyEnteredSystem

        public void notifyEnteredSystem()
        Description copied from class: EventSimEntity
        Notifies all registered listeners as well as the EventSimModel that the entity is about to enter the system.
        notifyEnteredSystem in class EventSimEntity
      • notifyLeftSystem

        public void notifyLeftSystem()
        Description copied from class: EventSimEntity
        Notifies all registered listeners as well as the EventSimModel that the entity has left the system.
        notifyLeftSystem in class EventSimEntity