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 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
ConstructorDescriptionSimActiveResource
(ExactSchedulingFactory exactSchedulingFactory, de.uka.ipd.sdq.scheduler.SchedulerModel model, ActiveResourceConfiguration resourceConf, de.uka.ipd.sdq.scheduler.resources.active.IResourceTableManager resourceTableManager) -
Method Summary
Modifier and TypeMethodDescriptionvoid
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
isIdle
(IResourceInstance instance) 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
setScheduler
(IScheduler scheduler) void
start()
void
stop()
void
unregisterProcess
(IActiveProcess process) 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
-
getInstanceList
-
lookUp
-
doProcessing
public void doProcessing(de.uka.ipd.sdq.scheduler.ISchedulableProcess sched_process, int resourceServiceID, double demand) - Specified by:
doProcessing
in classde.uka.ipd.sdq.scheduler.resources.active.AbstractActiveResource
-
start
public void start() -
isIdle
-
setScheduler
-
dequeue
protected void dequeue(de.uka.ipd.sdq.scheduler.ISchedulableProcess process) - Specified by:
dequeue
in classde.uka.ipd.sdq.scheduler.resources.active.AbstractActiveResource
-
enqueue
protected void enqueue(de.uka.ipd.sdq.scheduler.ISchedulableProcess process) - Specified by:
enqueue
in classde.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
-
addObserver
public void addObserver(de.uka.ipd.sdq.scheduler.sensors.IActiveResourceStateSensor observer) - Specified by:
addObserver
in interfacede.uka.ipd.sdq.scheduler.IActiveResource
- Overrides:
addObserver
in classde.uka.ipd.sdq.scheduler.resources.active.AbstractActiveResource
-
findProcess
-
notifyTerminated
public void notifyTerminated(de.uka.ipd.sdq.scheduler.ISchedulableProcess simProcess) - Specified by:
notifyTerminated
in interfacede.uka.ipd.sdq.scheduler.IActiveResource
- Overrides:
notifyTerminated
in classde.uka.ipd.sdq.scheduler.resources.active.AbstractActiveResource
-
getQueueLengthFor
public int getQueueLengthFor(de.uka.ipd.sdq.scheduler.entities.SchedulerEntity schedulerEntity, int coreId)
-