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.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static @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

    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

    Modifier and Type
    Method
    Description
    <T extends EObject>
    T
    findModel(EClass targetType)
    Enables 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 the PCMResourceSetPartition in order to keep track of model changes.
    void
    Calling this method has the current instance stop observing the PCMResourceSetPartition.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 the PCMResourceSetPartition in order to keep track of model changes.
      See Also:
    • stopObservingPcmChanges

      public void stopObservingPcmChanges()
      Calling this method has the current instance stop observing the PCMResourceSetPartition.
      See Also:
    • 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.
    • getBlackboard

      public de.uka.ipd.sdq.workflow.mdsd.blackboard.MDSDBlackboard getBlackboard()
      Returns:
      the blackboard that contains the global PCM partition.