Class PCMPartitionManager
java.lang.Object
org.palladiosimulator.simulizar.utils.PCMPartitionManager
The class manages all the models that are required during simulation. This includes querying for
specific models as well as observing and handling model changes.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic @interface
The Global annotation should be used to reference to the global PCMResourceSet partition for constructor injection.static @interface
The Local annotation should be used to reference to the PCMResourceSet partition of the current interpretation scope for constructor injection. -
Constructor Summary
ConstructorDescriptionPCMPartitionManager
(de.uka.ipd.sdq.workflow.mdsd.blackboard.MDSDBlackboard blackboard, SimuLizarWorkflowConfiguration config) The constructor initializes the blackboard, which is the primary source to manage, makes copies of the current PCM related mode, which may be changed by reconfigurations. -
Method Summary
Modifier and TypeMethodDescription<T extends EObject>
TEnables to query the blackboard for a specific model that has been stored.de.uka.ipd.sdq.workflow.mdsd.blackboard.MDSDBlackboard
org.palladiosimulator.analyzer.workflow.blackboard.PCMResourceSetPartition
org.palladiosimulator.analyzer.workflow.blackboard.PCMResourceSetPartition
void
void
Calling this method has the current instance observe thePCMResourceSetPartition
in order to keep track of model changes.void
Calling this method has the current instance stop observing thePCMResourceSetPartition
.
-
Constructor Details
-
PCMPartitionManager
public PCMPartitionManager(de.uka.ipd.sdq.workflow.mdsd.blackboard.MDSDBlackboard blackboard, SimuLizarWorkflowConfiguration config) The constructor initializes the blackboard, which is the primary source to manage, makes copies of the current PCM related mode, which may be changed by reconfigurations. Moreover, a runtime measurement model is created and temporarily persisted (this is necessary for keeping it in the blackboard) until simulation is done.- Parameters:
blackboard
- The workflow engine's blackboard holding all models.config
- SimuLizar workflow configuration object.
-
-
Method Details
-
initialize
public void initialize() -
getGlobalPCMModel
public org.palladiosimulator.analyzer.workflow.blackboard.PCMResourceSetPartition getGlobalPCMModel()- Returns:
- the global PCM modeling partition. The global PCM model is the primary model under change, e.g., whenever a reconfiguration is triggered, and is observed during simulation.
-
getLocalPCMModel
public org.palladiosimulator.analyzer.workflow.blackboard.PCMResourceSetPartition getLocalPCMModel()- Returns:
- a copy of the global PCM modeling partition. The local PCM model represents an up-to-date snapshot of the global PCM model that captures the latest changes made in the global PCM model.
-
startObservingPcmChanges
public void startObservingPcmChanges()Calling this method has the current instance observe thePCMResourceSetPartition
in order to keep track of model changes.- See Also:
-
stopObservingPcmChanges
public void stopObservingPcmChanges()Calling this method has the current instance stop observing thePCMResourceSetPartition
. -
findModel
Enables to query the blackboard for a specific model that has been stored.- Parameters:
targetType
- Corresponds to the EClass of the target model to be searched for.- Returns:
- the model to search for or null if the model was not found.
-
getBlackboard
public de.uka.ipd.sdq.workflow.mdsd.blackboard.MDSDBlackboard getBlackboard()- Returns:
- the blackboard that contains the global PCM partition.
-