Interface IResourceInstance

All Superinterfaces:
de.uka.ipd.sdq.simulation.abstractsimengine.IEntity
All Known Implementing Classes:
SimResourceInstance

public interface IResourceInstance extends de.uka.ipd.sdq.simulation.abstractsimengine.IEntity
This class represents an instance of an active resources. It got a unique ID and knows the process it is currently executing.
  • Field Summary

    Fields inherited from interface de.uka.ipd.sdq.simulation.abstractsimengine.IEntity

    NULL
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addObserver(de.uka.ipd.sdq.scheduler.sensors.IActiveResourceStateSensor observer)
     
    void
    assign(de.uka.ipd.sdq.scheduler.IRunningProcess process)
    Assigns a new process to this instance.
    void
    Removes a pending SchedulingEvent.
    de.uka.ipd.sdq.scheduler.IRunningProcess
     
    Unique name of the resource instance.
    double
     
    de.uka.ipd.sdq.scheduler.IRunningProcess
     
    boolean
     
    boolean
     
    boolean
     
    void
    Releases the current resource instance.
    void
    removeObserver(de.uka.ipd.sdq.scheduler.sensors.IActiveResourceStateSensor observer)
     
    void
    Schedules the next SchedulingEvent for the instance at the specified time.
    void
    schedulingInterrupt(double time)
    Schedules a SchedulingInterrupt.
    void
    setIsScheduling(boolean b)
     
    void
     
    void
     

    Methods inherited from interface de.uka.ipd.sdq.simulation.abstractsimengine.IEntity

    isScheduled, reschedule
  • Method Details

    • getName

      String getName()
      Unique name of the resource instance.
      Returns:
      The unique name of the resource instance.
    • getRunningProcess

      de.uka.ipd.sdq.scheduler.IRunningProcess getRunningProcess()
      Returns:
      Returns the process currently executing on the resource.
    • processAssigned

      boolean processAssigned()
      Returns:
      True, if there is process executing on this resource instance, false otherwise.
    • assign

      void assign(de.uka.ipd.sdq.scheduler.IRunningProcess process)
      Assigns a new process to this instance. Note that the resource has to be idle to do so.
      Parameters:
      process - Process to execute on the resource instance.
    • release

      void release()
      Releases the current resource instance.
    • scheduleSchedulingEvent

      void scheduleSchedulingEvent(double time)
      Schedules the next SchedulingEvent for the instance at the specified time. The event my be deferred or canceled by other actions.
      Parameters:
      time - Time the event shall occur.
    • schedulingInterrupt

      void schedulingInterrupt(double time)
      Schedules a SchedulingInterrupt. This event cannot be interrupted or moved and will occur at the specified time.
      Parameters:
      time -
      b -
    • cancelSchedulingEvent

      void cancelSchedulingEvent()
      Removes a pending SchedulingEvent.
    • getNextSchedEventTime

      double getNextSchedEventTime()
    • start

      void start()
    • stop

      void stop()
    • setIsScheduling

      void setIsScheduling(boolean b)
    • isScheduling

      boolean isScheduling()
    • addObserver

      void addObserver(de.uka.ipd.sdq.scheduler.sensors.IActiveResourceStateSensor observer)
    • removeObserver

      void removeObserver(de.uka.ipd.sdq.scheduler.sensors.IActiveResourceStateSensor observer)
    • isIdle

      boolean isIdle()
    • getLastRunningProcess

      de.uka.ipd.sdq.scheduler.IRunningProcess getLastRunningProcess()