Interface IActiveProcess
- All Superinterfaces:
de.uka.ipd.sdq.simulation.abstractsimengine.IEntity,de.uka.ipd.sdq.scheduler.IRunningProcess
- All Known Implementing Classes:
ActiveProcess,PreemptiveProcess,ProcessWithPriority
public interface IActiveProcess
extends de.uka.ipd.sdq.scheduler.IRunningProcess
Not externally visible methods for running processes.
-
Field Summary
Fields inherited from interface de.uka.ipd.sdq.simulation.abstractsimengine.IEntity
NULL -
Method Summary
Modifier and TypeMethodDescriptionvoidCancels an already scheduled ProceedEvent, e.g.booleancheckAffinity(IResourceInstance instance) Checks if the given instance is in the set of affinity instances of the process.createNewInstance(de.uka.ipd.sdq.scheduler.ISchedulableProcess process) doublede.uka.ipd.sdq.scheduler.processes.PROCESS_STATEgetState()doublebooleanbooleanbooleanbooleanisIdealInstance(IResourceInstance instance) Checks if the given instance is the ideal instance of the process.booleanisLastInstance(IResourceInstance instance) booleanisMovable(IResourceInstance targetInstance) booleanisReady()booleanbooleanvoidremoveNonAffineInstances(List<IResourceInstance> instance_list) Removes all instances the process is not allowed to run on from the given list.voidscheduleProceedEvent(IScheduler scheduler) Schedules a proceed event for the process at the time the current demand is expired.voidsetAffineInstances(List<IResourceInstance> instance_list) Sets the affine instances for the process.voidsetCurrentDemand(double new_demand) Sets the new demand for a process.voidsetDelayedAction(IDelayedAction action) Sets a delayed action for the process, that need to be executed as soon as the process is running.voidsetIdealInstance(IResourceInstance instance) Sets the ideal instance of the process.voidsetLastInstance(IResourceInstance instance) Sets the instance the process is or just was running on.voidsetReady()Change the current state of the process to ready.voidChange the current state of the process to running.voidsetRunQueue(IRunQueue runqueue) Sets the current runqueue of the process.voidChange the current state of the process to waiting.voidtoNow()Proceeds all timing variables to the current simulation time.voidupdate()Updates the process's timeslice and priority, if there is such.voidwasMovedTo(IResourceInstance dest) Methods inherited from interface de.uka.ipd.sdq.simulation.abstractsimengine.IEntity
isScheduled, rescheduleMethods inherited from interface de.uka.ipd.sdq.scheduler.IRunningProcess
addStateSensor, getId, getName, getSchedulableProcess, removeStateSensor
-
Method Details
-
getRunQueue
IRunQueue getRunQueue()- Returns:
- Returns the current runqueue of the process. NULL if the process is in no runqueue.
-
setRunQueue
Sets the current runqueue of the process.- Parameters:
runqueue-
-
getState
de.uka.ipd.sdq.scheduler.processes.PROCESS_STATE getState()- Returns:
- Returns the current state of the process.
-
setRunning
void setRunning()Change the current state of the process to running. -
setReady
void setReady()Change the current state of the process to ready. -
setWaiting
void setWaiting()Change the current state of the process to waiting. -
isRunning
boolean isRunning()- Returns:
- True, if the process is in the running state, otherwise false.
-
isReady
boolean isReady()- Returns:
- True, if the process is in the ready state, otherwise false.
-
isWaiting
boolean isWaiting()- Returns:
- True, if the process is in the waiting state, otherwise false.
-
getCurrentDemand
double getCurrentDemand()- Returns:
- Returns the current demand of the process.
-
setCurrentDemand
void setCurrentDemand(double new_demand) Sets the new demand for a process. In order to do so, the current demand must be zero, i.e. has been completely processed.- Parameters:
new_demand-
-
toNow
void toNow()Proceeds all timing variables to the current simulation time. The current demand is reduced only, if the process is in running state. -
setAffineInstances
Sets the affine instances for the process. The process is only allowed to run on these instances. If the list is set to NULL the process can run on any instance.- Parameters:
instance_list-
-
hasAffinityList
boolean hasAffinityList()- Returns:
- True, if the process has a list of affinity instances, otherwise false.
-
checkAffinity
Checks if the given instance is in the set of affinity instances of the process.- Parameters:
instance-- Returns:
-
removeNonAffineInstances
Removes all instances the process is not allowed to run on from the given list.- Parameters:
instance_list-
-
setIdealInstance
Sets the ideal instance of the process. That is the instance most preferred for the process.- Parameters:
instance-
-
hasIdealInstance
boolean hasIdealInstance()- Returns:
- True, if the process has an ideal instance, otherwise false.
-
isIdealInstance
Checks if the given instance is the ideal instance of the process.- Parameters:
instance-- Returns:
- True, if the instance is the process' ideal instance, otherwise false.
-
getIdealInstance
IResourceInstance getIdealInstance()- Returns:
- Returns the ideal instance of the process.
-
setLastInstance
Sets the instance the process is or just was running on.- Parameters:
instance-
-
hasLastInstance
boolean hasLastInstance()- Returns:
- True, if the last instance of the process is set.
-
getLastInstance
IResourceInstance getLastInstance()- Returns:
- If the process is in running state, the method returns the instance the process is currently running on. Otherwise, the instance the process was recently running on is returned.
-
isLastInstance
- Parameters:
instance-- Returns:
- True, if the given instance is equal to the last instance of the process.
-
scheduleProceedEvent
Schedules a proceed event for the process at the time the current demand is expired. -
cancelProceedEvent
void cancelProceedEvent()Cancels an already scheduled ProceedEvent, e.g. if the process is interrupted. -
getTimeUntilNextInterruption
double getTimeUntilNextInterruption()- Returns:
- Returns the time the process will be interrupted next.
-
setDelayedAction
Sets a delayed action for the process, that need to be executed as soon as the process is running. Only one delayed action at a time is allowed.- Parameters:
action-
-
update
void update()Updates the process's timeslice and priority, if there is such. -
createNewInstance
-
isMovable
-
wasMovedTo
-