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.
  • Method Details

    • getRunQueue

      IRunQueue getRunQueue()
      Returns:
      Returns the current runqueue of the process. NULL if the process is in no runqueue.
    • setRunQueue

      void setRunQueue(IRunQueue runqueue)
      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

      void setAffineInstances(List<IResourceInstance> instance_list)
      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

      boolean checkAffinity(IResourceInstance instance)
      Checks if the given instance is in the set of affinity instances of the process.
      Parameters:
      instance -
      Returns:
    • removeNonAffineInstances

      void removeNonAffineInstances(List<IResourceInstance> instance_list)
      Removes all instances the process is not allowed to run on from the given list.
      Parameters:
      instance_list -
    • setIdealInstance

      void setIdealInstance(IResourceInstance instance)
      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

      boolean isIdealInstance(IResourceInstance instance)
      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

      void setLastInstance(IResourceInstance instance)
      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

      boolean isLastInstance(IResourceInstance instance)
      Parameters:
      instance -
      Returns:
      True, if the given instance is equal to the last instance of the process.
    • scheduleProceedEvent

      void scheduleProceedEvent(IScheduler scheduler)
      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

      void setDelayedAction(IDelayedAction action)
      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

      IActiveProcess createNewInstance(de.uka.ipd.sdq.scheduler.ISchedulableProcess process)
    • isMovable

      boolean isMovable(IResourceInstance targetInstance)
    • wasMovedTo

      void wasMovedTo(IResourceInstance dest)