Package de.uka.ipd.sdq.simucomframework
Class SimuComSimProcess
- 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
-
- All Implemented Interfaces:
de.uka.ipd.sdq.scheduler.ISchedulableProcess
,de.uka.ipd.sdq.simulation.abstractsimengine.IEntity
,de.uka.ipd.sdq.simulation.abstractsimengine.ISimProcess
,de.uka.ipd.sdq.simulation.abstractsimengine.ISimProcessListener
- Direct Known Subclasses:
ClosedWorkloadUser
,ForkedBehaviourProcess
,OpenWorkload
,OpenWorkloadUser
public abstract class SimuComSimProcess extends de.uka.ipd.sdq.simulation.abstractsimengine.AbstractSimProcessDelegator implements de.uka.ipd.sdq.scheduler.ISchedulableProcess, de.uka.ipd.sdq.simulation.abstractsimengine.ISimProcessListener
-
-
Field Summary
Fields Modifier and Type Field Description protected long
currentSessionId
protected static org.apache.log4j.Logger
LOGGER
Logger for this class.
-
Constructor Summary
Constructors Modifier Constructor Description protected
SimuComSimProcess(SimuComModel model, String name, de.uka.ipd.sdq.scheduler.resources.active.IResourceTableManager resourceTableManager)
protected
SimuComSimProcess(SimuComModel model, String name, org.palladiosimulator.probeframework.measurement.RequestContext parentRequestContext, de.uka.ipd.sdq.scheduler.resources.active.IResourceTableManager resourceTableManager)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
activate()
protected void
addProcessToSimStatus()
Clients may override default behaviour, e.g., PassiveResourcevoid
addTerminatedObserver(de.uka.ipd.sdq.scheduler.IActiveResource r)
void
fireTerminated()
long
getCurrentSessionId()
SimuComModel
getModel()
int
getPriority()
org.palladiosimulator.probeframework.measurement.RequestContext
getRequestContext()
Returns theRequestContext
in which this simulated process is executed.de.uka.ipd.sdq.scheduler.ISchedulableProcess
getRootProcess()
Process
getSimProcessStatus()
void
hold(double d)
protected abstract void
internalLifeCycle()
boolean
isFinished()
void
lifeCycle()
void
notifyResuming(de.uka.ipd.sdq.simulation.abstractsimengine.ISimProcess process)
void
notifySuspending(de.uka.ipd.sdq.simulation.abstractsimengine.ISimProcess process)
void
notifyTerminated(de.uka.ipd.sdq.simulation.abstractsimengine.ISimProcess process)
protected void
removeProcessFromSimStatus()
void
removeTerminatedObserver(de.uka.ipd.sdq.scheduler.IActiveResource r)
void
setPriority(int priority)
void
timeout(String timeoutFailureTypeId)
protected void
updateNewSessionID()
-
Methods inherited from class de.uka.ipd.sdq.simulation.abstractsimengine.AbstractSimProcessDelegator
addProcessListener, getId, getRawId, isTerminated, passivate, passivate, preempt, removeProcessListener, scheduleAt
-
Methods inherited from class de.uka.ipd.sdq.simulation.abstractsimengine.AbstractSimEntityDelegator
getEncapsulatedEntity, isScheduled, reschedule
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Constructor Detail
-
SimuComSimProcess
protected SimuComSimProcess(SimuComModel model, String name, de.uka.ipd.sdq.scheduler.resources.active.IResourceTableManager resourceTableManager)
-
SimuComSimProcess
protected SimuComSimProcess(SimuComModel model, String name, org.palladiosimulator.probeframework.measurement.RequestContext parentRequestContext, de.uka.ipd.sdq.scheduler.resources.active.IResourceTableManager resourceTableManager)
-
-
Method Detail
-
getPriority
public int getPriority()
- Specified by:
getPriority
in interfacede.uka.ipd.sdq.scheduler.ISchedulableProcess
-
setPriority
public void setPriority(int priority)
- Specified by:
setPriority
in interfacede.uka.ipd.sdq.scheduler.ISchedulableProcess
-
activate
public void activate()
- Specified by:
activate
in interfacede.uka.ipd.sdq.scheduler.ISchedulableProcess
-
timeout
public void timeout(String timeoutFailureTypeId)
- Specified by:
timeout
in interfacede.uka.ipd.sdq.scheduler.ISchedulableProcess
-
addProcessToSimStatus
protected void addProcessToSimStatus()
Clients may override default behaviour, e.g., PassiveResource
-
addTerminatedObserver
public void addTerminatedObserver(de.uka.ipd.sdq.scheduler.IActiveResource r)
- Specified by:
addTerminatedObserver
in interfacede.uka.ipd.sdq.scheduler.ISchedulableProcess
-
fireTerminated
public void fireTerminated()
- Specified by:
fireTerminated
in interfacede.uka.ipd.sdq.scheduler.ISchedulableProcess
-
getCurrentSessionId
public long getCurrentSessionId()
-
getRequestContext
public org.palladiosimulator.probeframework.measurement.RequestContext getRequestContext()
Returns theRequestContext
in which this simulated process is executed.- Returns:
- the request context
-
getRootProcess
public de.uka.ipd.sdq.scheduler.ISchedulableProcess getRootProcess()
- Specified by:
getRootProcess
in interfacede.uka.ipd.sdq.scheduler.ISchedulableProcess
-
getSimProcessStatus
public Process getSimProcessStatus()
-
hold
public void hold(double d)
-
internalLifeCycle
protected abstract void internalLifeCycle()
-
isFinished
public boolean isFinished()
- Specified by:
isFinished
in interfacede.uka.ipd.sdq.scheduler.ISchedulableProcess
-
lifeCycle
public final void lifeCycle()
- Specified by:
lifeCycle
in classde.uka.ipd.sdq.simulation.abstractsimengine.AbstractSimProcessDelegator
-
removeProcessFromSimStatus
protected void removeProcessFromSimStatus()
-
removeTerminatedObserver
public void removeTerminatedObserver(de.uka.ipd.sdq.scheduler.IActiveResource r)
- Specified by:
removeTerminatedObserver
in interfacede.uka.ipd.sdq.scheduler.ISchedulableProcess
-
updateNewSessionID
protected void updateNewSessionID()
-
notifyResuming
public void notifyResuming(de.uka.ipd.sdq.simulation.abstractsimengine.ISimProcess process)
- Specified by:
notifyResuming
in interfacede.uka.ipd.sdq.simulation.abstractsimengine.ISimProcessListener
-
notifySuspending
public void notifySuspending(de.uka.ipd.sdq.simulation.abstractsimengine.ISimProcess process)
- Specified by:
notifySuspending
in interfacede.uka.ipd.sdq.simulation.abstractsimengine.ISimProcessListener
-
notifyTerminated
public void notifyTerminated(de.uka.ipd.sdq.simulation.abstractsimengine.ISimProcess process)
- Specified by:
notifyTerminated
in interfacede.uka.ipd.sdq.simulation.abstractsimengine.ISimProcessListener
-
getModel
public SimuComModel getModel()
- Overrides:
getModel
in classde.uka.ipd.sdq.simulation.abstractsimengine.SimulationElement
-
-