Class PCMPartitionManager
- java.lang.Object
-
- org.palladiosimulator.simulizar.utils.PCMPartitionManager
-
public class PCMPartitionManager extends Object
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.
-
-
Constructor Summary
Constructors Constructor Description 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cleanUp()
Removes all temporary resources that has been used during simulation.<T extends EObject>
TfindModel(EClass targetType)
Enables to query the blackboard for a specific model that has been stored.de.uka.ipd.sdq.workflow.mdsd.blackboard.MDSDBlackboard
getBlackboard()
org.palladiosimulator.analyzer.workflow.blackboard.PCMResourceSetPartition
getGlobalPCMModel()
org.palladiosimulator.analyzer.workflow.blackboard.PCMResourceSetPartition
getLocalPCMModel()
PCMPartitionManager
makeSnapshot()
void
startObservingPcmChanges()
Calling this method has the current instance observe thePCMResourceSetPartition
in order to keep track of model changes.void
stopObservingPcmChanges()
Calling this method has the current instance stop observing thePCMResourceSetPartition
.
-
-
-
Constructor Detail
-
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 Detail
-
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:
getGlobalPCMModel()
,stopObservingPcmChanges()
-
stopObservingPcmChanges
public void stopObservingPcmChanges()
Calling this method has the current instance stop observing thePCMResourceSetPartition
.- See Also:
getGlobalPCMModel()
,startObservingPcmChanges()
-
findModel
public <T extends EObject> T findModel(EClass targetType)
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.
-
makeSnapshot
public PCMPartitionManager makeSnapshot()
- Returns:
- a snapshot of the current PCMPartitionManager object.
- See Also:
PCMPartitionManager(PCMPartitionManager)
-
getBlackboard
public de.uka.ipd.sdq.workflow.mdsd.blackboard.MDSDBlackboard getBlackboard()
- Returns:
- the blackboard that contains the global PCM partition.
-
cleanUp
public void cleanUp()
Removes all temporary resources that has been used during simulation.
-
-