Class AllocationRegistry


  • public class AllocationRegistry
    extends Object
    This class serves as a registry for resource allocations, i.e. for the deployment of AssemblyContext on SimulatedResourceContainers.

    Use allocate() to add an allocation. Existing allocations can be returned by using the getResourceContainer() method.

    See Also:
    BuildResourceAllocation
    • Constructor Detail

      • AllocationRegistry

        public AllocationRegistry()
        Constructs an empty registry for resource allocations.
    • Method Detail

      • allocate

        public void allocate​(org.palladiosimulator.pcm.core.composition.AssemblyContext assemblyCtx,
                             SimulatedResourceContainer resourceContainer)
        Allocates the given AssemblyContext to the specified resource container.
        Parameters:
        assemblyCtx - the AssemblyContext
        resourceContainer - the resource container
      • getResourceContainer

        public SimulatedResourceContainer getResourceContainer​(org.palladiosimulator.pcm.core.composition.AssemblyContext assemblyCtx)
        Returns the resource container that has been allocated to the specified AssemblyContext.
        Parameters:
        assemblyCtx - the AssemblyContext
        Returns:
        the resource container on which the given AssemblyContext is deployed