Class EventSimPassiveResourceModel
- java.lang.Object
-
- edu.kit.ipd.sdq.eventsim.resources.EventSimPassiveResourceModel
-
- All Implemented Interfaces:
IPassiveResource
public class EventSimPassiveResourceModel extends Object implements IPassiveResource
-
-
Constructor Summary
Constructors Constructor Description EventSimPassiveResourceModel(ISimulationMiddleware middleware)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
acquire(IRequest request, org.palladiosimulator.pcm.core.composition.AssemblyContext assCtx, org.palladiosimulator.pcm.repository.PassiveResource specification, int num, Procedure onGrantedCallback)
Acquires the specified number of instance of a passive resource.void
finalise()
SimPassiveResource
getPassiveResource(org.palladiosimulator.pcm.repository.PassiveResource specification, org.palladiosimulator.pcm.core.composition.AssemblyContext assCtx)
void
init()
void
release(IRequest request, org.palladiosimulator.pcm.core.composition.AssemblyContext assCtx, org.palladiosimulator.pcm.repository.PassiveResource specification, int i)
Releases a specific amount of a passive resource.
-
-
-
Constructor Detail
-
EventSimPassiveResourceModel
@Inject public EventSimPassiveResourceModel(ISimulationMiddleware middleware)
-
-
Method Detail
-
init
public void init()
-
acquire
public void acquire(IRequest request, org.palladiosimulator.pcm.core.composition.AssemblyContext assCtx, org.palladiosimulator.pcm.repository.PassiveResource specification, int num, Procedure onGrantedCallback)
Description copied from interface:IPassiveResource
Acquires the specified number of instance of a passive resource.- Specified by:
acquire
in interfaceIPassiveResource
- Parameters:
request
- the request acquiring the passive resourceassCtx
- the passive resource's assembly context is required to uniquely identify the passive resourcespecification
- the passive resource to be acquirednum
- the number of instancesonGrantedCallback
- the callback to be invoked once the demanded number of instances have been granted to the request
-
finalise
public void finalise()
-
release
public void release(IRequest request, org.palladiosimulator.pcm.core.composition.AssemblyContext assCtx, org.palladiosimulator.pcm.repository.PassiveResource specification, int i)
Description copied from interface:IPassiveResource
Releases a specific amount of a passive resource.- Specified by:
release
in interfaceIPassiveResource
- Parameters:
request
- the request releasing the passive resourceassCtx
- the passive resource's assembly context is required to uniquely identify the passive resourcespecification
- the passive resource to be releasedi
- the number of instances
-
getPassiveResource
public SimPassiveResource getPassiveResource(org.palladiosimulator.pcm.repository.PassiveResource specification, org.palladiosimulator.pcm.core.composition.AssemblyContext assCtx)
- Parameters:
specification
- the passive resource specification- Returns:
- the resource instance for the given resource specification
-
-