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 eachAssemblyContext
to 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 allocatesAssemblyContext
to resource container instances in accordance with theAllocation
model.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
cachable()
AllocationRegistry
execute(PCMModel pcm, ICommandExecutor<PCMModel> executor)
Executes the operation encapsulated by this class.
-
-
-
Constructor Detail
-
BuildResourceAllocation
public BuildResourceAllocation(SimulatedResourceEnvironment environment)
Constructs a command that allocatesAssemblyContext
to resource container instances in accordance with theAllocation
model.- 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
ICommandExecutor
instead to execute the operation.- Specified by:
execute
in interfaceICommand<AllocationRegistry,PCMModel>
- Parameters:
pcm
- the modelexecutor
- theICommandExecutor
that currently executes this operation. Use this reference to invoke sub-operations also implementing thisICommand
interface.- Returns:
-
cachable
public boolean cachable()
- Specified by:
cachable
in interfaceICommand<AllocationRegistry,PCMModel>
- Returns:
- whether the command may be cached or not.
-
-