Class SimActiveResource

java.lang.Object
de.uka.ipd.sdq.simulation.abstractsimengine.SimulationElement
de.uka.ipd.sdq.simulation.abstractsimengine.AbstractSimEntityDelegator
de.uka.ipd.sdq.scheduler.entities.SchedulerEntity
de.uka.ipd.sdq.scheduler.resources.AbstractSimResource
de.uka.ipd.sdq.scheduler.resources.active.AbstractActiveResource
edu.kit.ipd.sdq.pcm.simulation.scheduler.exact.SimActiveResource
All Implemented Interfaces:
de.uka.ipd.sdq.scheduler.IActiveResource, de.uka.ipd.sdq.simulation.abstractsimengine.IEntity

public class SimActiveResource extends de.uka.ipd.sdq.scheduler.resources.active.AbstractActiveResource
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final org.apache.log4j.Logger
     

    Fields inherited from class de.uka.ipd.sdq.scheduler.resources.AbstractSimResource

    capacity

    Fields inherited from class de.uka.ipd.sdq.simulation.abstractsimengine.AbstractSimEntityDelegator

    delegate

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

    NULL
  • Constructor Summary

    Constructors
    Constructor
    Description
    SimActiveResource(ExactSchedulingFactory exactSchedulingFactory, de.uka.ipd.sdq.scheduler.SchedulerModel model, ActiveResourceConfiguration resourceConf, de.uka.ipd.sdq.scheduler.resources.active.IResourceTableManager resourceTableManager)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addObserver(de.uka.ipd.sdq.scheduler.sensors.IActiveResourceStateSensor observer)
     
    protected void
    dequeue(de.uka.ipd.sdq.scheduler.ISchedulableProcess process)
     
    void
    doProcessing(de.uka.ipd.sdq.scheduler.ISchedulableProcess sched_process, int resourceServiceID, double demand)
     
    protected void
    enqueue(de.uka.ipd.sdq.scheduler.ISchedulableProcess process)
     
    findProcess(String processName)
     
     
    int
    getQueueLengthFor(de.uka.ipd.sdq.scheduler.entities.SchedulerEntity schedulerEntity, int coreId)
     
    double
    getRemainingDemand(de.uka.ipd.sdq.scheduler.ISchedulableProcess process)
     
     
    boolean
     
    lookUp(de.uka.ipd.sdq.scheduler.ISchedulableProcess process)
     
    void
    notifyTerminated(de.uka.ipd.sdq.scheduler.ISchedulableProcess simProcess)
     
    void
    registerProcess(de.uka.ipd.sdq.scheduler.ISchedulableProcess schedulableProcess)
     
    void
     
    void
     
    void
     
    void
     
    void
    updateDemand(de.uka.ipd.sdq.scheduler.ISchedulableProcess process, double demand)
     

    Methods inherited from class de.uka.ipd.sdq.scheduler.resources.active.AbstractActiveResource

    doProcessing, fireDemandCompleted, fireStateChange, process, removeObserver

    Methods inherited from class de.uka.ipd.sdq.scheduler.resources.AbstractSimResource

    equals, getCapacity, getId, getName, hashCode, toString

    Methods inherited from class de.uka.ipd.sdq.scheduler.entities.SchedulerEntity

    getModel

    Methods inherited from class de.uka.ipd.sdq.simulation.abstractsimengine.AbstractSimEntityDelegator

    getEncapsulatedEntity, isScheduled, reschedule

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface de.uka.ipd.sdq.scheduler.IActiveResource

    getId, getName
  • Field Details

    • logger

      public static final org.apache.log4j.Logger logger
  • Constructor Details

    • SimActiveResource

      public SimActiveResource(ExactSchedulingFactory exactSchedulingFactory, de.uka.ipd.sdq.scheduler.SchedulerModel model, ActiveResourceConfiguration resourceConf, de.uka.ipd.sdq.scheduler.resources.active.IResourceTableManager resourceTableManager)
  • Method Details

    • getScheduler

      public IScheduler getScheduler()
    • getInstanceList

      public List<IResourceInstance> getInstanceList()
    • lookUp

      public IActiveProcess lookUp(de.uka.ipd.sdq.scheduler.ISchedulableProcess process)
    • doProcessing

      public void doProcessing(de.uka.ipd.sdq.scheduler.ISchedulableProcess sched_process, int resourceServiceID, double demand)
      Specified by:
      doProcessing in class de.uka.ipd.sdq.scheduler.resources.active.AbstractActiveResource
    • start

      public void start()
    • isIdle

      public boolean isIdle(IResourceInstance instance)
    • setScheduler

      public void setScheduler(IScheduler scheduler)
    • dequeue

      protected void dequeue(de.uka.ipd.sdq.scheduler.ISchedulableProcess process)
      Specified by:
      dequeue in class de.uka.ipd.sdq.scheduler.resources.active.AbstractActiveResource
    • enqueue

      protected void enqueue(de.uka.ipd.sdq.scheduler.ISchedulableProcess process)
      Specified by:
      enqueue in class de.uka.ipd.sdq.scheduler.resources.active.AbstractActiveResource
    • stop

      public void stop()
    • getRemainingDemand

      public double getRemainingDemand(de.uka.ipd.sdq.scheduler.ISchedulableProcess process)
    • updateDemand

      public void updateDemand(de.uka.ipd.sdq.scheduler.ISchedulableProcess process, double demand)
    • registerProcess

      public void registerProcess(de.uka.ipd.sdq.scheduler.ISchedulableProcess schedulableProcess)
    • unregisterProcess

      public void unregisterProcess(IActiveProcess process)
    • addObserver

      public void addObserver(de.uka.ipd.sdq.scheduler.sensors.IActiveResourceStateSensor observer)
      Specified by:
      addObserver in interface de.uka.ipd.sdq.scheduler.IActiveResource
      Overrides:
      addObserver in class de.uka.ipd.sdq.scheduler.resources.active.AbstractActiveResource
    • findProcess

      public IActiveProcess findProcess(String processName)
    • notifyTerminated

      public void notifyTerminated(de.uka.ipd.sdq.scheduler.ISchedulableProcess simProcess)
      Specified by:
      notifyTerminated in interface de.uka.ipd.sdq.scheduler.IActiveResource
      Overrides:
      notifyTerminated in class de.uka.ipd.sdq.scheduler.resources.active.AbstractActiveResource
    • getQueueLengthFor

      public int getQueueLengthFor(de.uka.ipd.sdq.scheduler.entities.SchedulerEntity schedulerEntity, int coreId)