Class BuildResourceAllocation
- java.lang.Object
-
- edu.kit.ipd.sdq.eventsim.system.staticstructure.commands.BuildResourceAllocation
-
- All Implemented Interfaces:
ICommand<AllocationRegistry,PCMModel>,IPCMCommand<AllocationRegistry>
public class BuildResourceAllocation extends Object implements IPCMCommand<AllocationRegistry>
This command allocates eachAssemblyContextto the resource container instance (SimulatedResourceContainer) on which it is supposed to be deployed on.
-
-
Constructor Summary
Constructors Constructor Description BuildResourceAllocation(SimulatedResourceEnvironment environment)Constructs a command that allocatesAssemblyContextto resource container instances in accordance with theAllocationmodel.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancachable()AllocationRegistryexecute(PCMModel pcm, ICommandExecutor<PCMModel> executor)Executes the operation encapsulated by this class.
-
-
-
Constructor Detail
-
BuildResourceAllocation
public BuildResourceAllocation(SimulatedResourceEnvironment environment)
Constructs a command that allocatesAssemblyContextto resource container instances in accordance with theAllocationmodel.- Parameters:
environment- the resource environment containing the resource container instances that are to be allocated
-
-
Method Detail
-
execute
public AllocationRegistry execute(PCMModel pcm, ICommandExecutor<PCMModel> executor)
Executes the operation encapsulated by this class.Notice: This method is not intended to be called by clients. Use a
ICommandExecutorinstead to execute the operation.- Specified by:
executein interfaceICommand<AllocationRegistry,PCMModel>- Parameters:
pcm- the modelexecutor- theICommandExecutorthat currently executes this operation. Use this reference to invoke sub-operations also implementing thisICommandinterface.- Returns:
-
cachable
public boolean cachable()
- Specified by:
cachablein interfaceICommand<AllocationRegistry,PCMModel>- Returns:
- whether the command may be cached or not.
-
-