Class SimuLizarRuntimeState
- java.lang.Object
-
- org.palladiosimulator.simulizar.runtimestate.SimuLizarRuntimeState
-
public class SimuLizarRuntimeState extends Object
This class provides access to all simulation and SimuLizar related objects. This includes access to the original SimuComModel (containing the simulated resources, simulated processes, etc.), to SimuLizars central simulator event distribution object, and to simulated component instances (e.g. to access their current state of passive resources, etc.). Per simulation run, there should be exactly one instance of this class and all of its managed information objects. NOTE: In an effort to improve testability, the number of class inter-dependencies need to be reduced. Therefore, please refrain from referencing the RuntimeState to access dependencies. Use dependency injection to retrieve the desired service / simulation entity directly.
-
-
Field Summary
Fields Modifier and Type Field Description protected EventNotificationHelper
eventHelper
protected de.uka.ipd.sdq.simucomframework.model.SimuComModel
model
protected UsageEvolverFacade
usageEvolverFacade
-
Constructor Summary
Constructors Constructor Description SimuLizarRuntimeState(PCMPartitionManager pcmPartitionManager, de.uka.ipd.sdq.simucomframework.model.SimuComModel simuComModel, EventNotificationHelper eventHelper, ComponentInstanceRegistry componentInstanceRegistry, SimulatedUsageModels simulatedUsageModels, Reconfigurator reconfigurator, UsageEvolverFacade usageEvolverFacade, Set<IInterpreterListener> interpreterListeners, SimulationCancelationDelegate cancelationDelegate, dagger.Lazy<InterpreterDefaultContext> mainContext, UsageScenarioSwitchFactory usageScenarioSwitchFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
cleanUp()
ComponentInstanceRegistry
getComponentInstanceRegistry()
Deprecated.Use dependency injection to retrieve the ComponentInstanceRegistry instance.EventNotificationHelper
getEventNotificationHelper()
Deprecated.Use dependency injection to retrieve the EventNotificationHelper instance.InterpreterDefaultContext
getMainContext()
Deprecated.Use dependency injection to retrieve the main context.de.uka.ipd.sdq.simucomframework.model.SimuComModel
getModel()
Deprecated.Use dependency injection to retrieve the SimuComModel instance.PCMPartitionManager
getPCMPartitionManager()
Deprecated.Use dependency injection to retrieve the PCMPartitionManager instance.Reconfigurator
getReconfigurator()
Deprecated.Use dependency injection to retrieve the Reconfigurator instance.UsageEvolverFacade
getUsageEvolverFacade()
Deprecated.Use dependency injection to retrieve the UsageEvolverFacade instance.SimulatedUsageModels
getUsageModels()
Deprecated.Use dependency injection to retrieve the SimulatedUsageModels instance.UsageScenarioSwitchFactory
getUsageScenarioSwitchFactory()
Deprecated.Use dependency injection to retrieve the UsageScenarioSwitchFactory instance.void
initialize()
boolean
isCanceled()
void
runSimulation()
-
-
-
Field Detail
-
model
protected final de.uka.ipd.sdq.simucomframework.model.SimuComModel model
-
eventHelper
protected final EventNotificationHelper eventHelper
-
usageEvolverFacade
protected final UsageEvolverFacade usageEvolverFacade
-
-
Constructor Detail
-
SimuLizarRuntimeState
@Inject public SimuLizarRuntimeState(PCMPartitionManager pcmPartitionManager, de.uka.ipd.sdq.simucomframework.model.SimuComModel simuComModel, EventNotificationHelper eventHelper, ComponentInstanceRegistry componentInstanceRegistry, SimulatedUsageModels simulatedUsageModels, Reconfigurator reconfigurator, UsageEvolverFacade usageEvolverFacade, Set<IInterpreterListener> interpreterListeners, SimulationCancelationDelegate cancelationDelegate, dagger.Lazy<InterpreterDefaultContext> mainContext, UsageScenarioSwitchFactory usageScenarioSwitchFactory)
- Parameters:
configuration
-modelAccess
-
-
-
Method Detail
-
initialize
public void initialize()
-
getModel
public de.uka.ipd.sdq.simucomframework.model.SimuComModel getModel()
Deprecated.Use dependency injection to retrieve the SimuComModel instance.- Returns:
- the SimuCom model
-
getEventNotificationHelper
public EventNotificationHelper getEventNotificationHelper()
Deprecated.Use dependency injection to retrieve the EventNotificationHelper instance.- Returns:
- the event notification helper
-
getComponentInstanceRegistry
public final ComponentInstanceRegistry getComponentInstanceRegistry()
Deprecated.Use dependency injection to retrieve the ComponentInstanceRegistry instance.- Returns:
- the component instance registry
-
getMainContext
@Deprecated public InterpreterDefaultContext getMainContext()
Deprecated.Use dependency injection to retrieve the main context.- Returns:
- the main Context
-
getUsageModels
@Deprecated public SimulatedUsageModels getUsageModels()
Deprecated.Use dependency injection to retrieve the SimulatedUsageModels instance.- Returns:
- the simulated usage model singleton
-
getPCMPartitionManager
@Deprecated public PCMPartitionManager getPCMPartitionManager()
Deprecated.Use dependency injection to retrieve the PCMPartitionManager instance.- Returns:
- the PCM partition manager
-
isCanceled
public boolean isCanceled()
-
getReconfigurator
@Deprecated public Reconfigurator getReconfigurator()
Deprecated.Use dependency injection to retrieve the Reconfigurator instance.Returns the reconfigurator responsible for executing reconfigurations and notifying listeners of changes.- Returns:
- The reconfigurator.
-
runSimulation
public void runSimulation()
-
cleanUp
public void cleanUp()
-
getUsageEvolverFacade
@Deprecated public UsageEvolverFacade getUsageEvolverFacade()
Deprecated.Use dependency injection to retrieve the UsageEvolverFacade instance.- Returns:
- the Usage Evolver Facade
-
getUsageScenarioSwitchFactory
@Deprecated public UsageScenarioSwitchFactory getUsageScenarioSwitchFactory()
Deprecated.Use dependency injection to retrieve the UsageScenarioSwitchFactory instance.- Returns:
- the Usage Scenario Switch Factory
-
-