Class SimUnfairPassiveResource
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
edu.kit.ipd.sdq.pcm.simulation.scheduler.exact.resources.passive.SimAbstractPassiveResource
edu.kit.ipd.sdq.pcm.simulation.scheduler.exact.resources.passive.SimUnfairPassiveResource
- All Implemented Interfaces:
de.uka.ipd.sdq.scheduler.IPassiveResource
,de.uka.ipd.sdq.simulation.abstractsimengine.IEntity
-
Field Summary
Fields inherited from class edu.kit.ipd.sdq.pcm.simulation.scheduler.exact.resources.passive.SimAbstractPassiveResource
main_resource, waiting_queue
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
ConstructorDescriptionSimUnfairPassiveResource
(de.uka.ipd.sdq.scheduler.SchedulerModel model, long capacity, org.palladiosimulator.pcm.repository.PassiveResource passiveResource, IPriorityBoost priority_boost, SimActiveResource managing_resource, double acquisition_demand, boolean isFifo, org.palladiosimulator.pcm.core.composition.AssemblyContext assemblyContext) -
Method Summary
Modifier and TypeMethodDescriptionboolean
acquire
(de.uka.ipd.sdq.scheduler.ISchedulableProcess sched_process, long num, boolean timeout, double timeoutValue) void
addObserver
(de.uka.ipd.sdq.scheduler.sensors.IPassiveResourceSensor observer) long
void
release
(de.uka.ipd.sdq.scheduler.ISchedulableProcess sched_process, long num) void
removeObserver
(de.uka.ipd.sdq.scheduler.sensors.IPassiveResourceSensor observer) protected boolean
tryToDequeueProcess
(WaitingProcess waitingProcess) Tries to remove the given process from the waiting queue and get access of the required number of passive resources.Methods inherited from class edu.kit.ipd.sdq.pcm.simulation.scheduler.exact.resources.passive.SimAbstractPassiveResource
boostPriority, fromRunningToWaiting, fromWaitingToReady, getAssemblyContext, getResource, getWaitingProcesses, punish, toString
Methods inherited from class de.uka.ipd.sdq.scheduler.resources.AbstractSimResource
equals, getCapacity, getId, getName, hashCode
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.IPassiveResource
getCapacity, getId, getName
-
Constructor Details
-
SimUnfairPassiveResource
public SimUnfairPassiveResource(de.uka.ipd.sdq.scheduler.SchedulerModel model, long capacity, org.palladiosimulator.pcm.repository.PassiveResource passiveResource, IPriorityBoost priority_boost, SimActiveResource managing_resource, double acquisition_demand, boolean isFifo, org.palladiosimulator.pcm.core.composition.AssemblyContext assemblyContext)
-
-
Method Details
-
acquire
public boolean acquire(de.uka.ipd.sdq.scheduler.ISchedulableProcess sched_process, long num, boolean timeout, double timeoutValue) -
release
public void release(de.uka.ipd.sdq.scheduler.ISchedulableProcess sched_process, long num) -
tryToDequeueProcess
Tries to remove the given process from the waiting queue and get access of the required number of passive resources.- Parameters:
waitingProcess
-- Returns:
- True if the process was successfully dequeued and activated, otherwise false.
-
addObserver
public void addObserver(de.uka.ipd.sdq.scheduler.sensors.IPassiveResourceSensor observer) -
removeObserver
public void removeObserver(de.uka.ipd.sdq.scheduler.sensors.IPassiveResourceSensor observer) -
getAvailable
public long getAvailable()
-