java.lang.Object
edu.kit.ipd.are.dsexplore.featurecompletions.weaver.strategy.manager.PcmAllocationManager

public class PcmAllocationManager extends Object
This class provides all operations performed on a given PCM allocation.
  • Constructor Summary

    Constructors
    Constructor
    Description
    PcmAllocationManager(org.palladiosimulator.pcm.allocation.Allocation allocation)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addAllocationContext(org.palladiosimulator.pcm.allocation.AllocationContext allocationContext)
    Adds an allocation context to the PCM allocation.
    org.palladiosimulator.pcm.allocation.AllocationContext
    createAllocationContextBy(org.palladiosimulator.pcm.core.composition.AssemblyContext assemblyContext, org.palladiosimulator.pcm.resourceenvironment.ResourceContainer resourceContainer)
    Creates a new allocation context.
    boolean
    existAllocationContextWith(org.palladiosimulator.pcm.core.composition.AssemblyContext assemblyContext)
    Checks if there exist at least one allocation context that allocates a given assembly context.
    Optional<org.palladiosimulator.pcm.allocation.AllocationContext>
    getAllocationContextBy(Predicate<org.palladiosimulator.pcm.allocation.AllocationContext> searchCriteria)
    Filters the allocation contexts which satisfies the given predicate.
    org.palladiosimulator.pcm.allocation.AllocationContext
    getAllocationContextContaining(org.palladiosimulator.pcm.repository.RepositoryComponent allocatedComponent)
    Returns the allocation contexts which allocates a given component.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PcmAllocationManager

      public PcmAllocationManager(org.palladiosimulator.pcm.allocation.Allocation allocation)
  • Method Details

    • getAllocationContextBy

      public Optional<org.palladiosimulator.pcm.allocation.AllocationContext> getAllocationContextBy(Predicate<org.palladiosimulator.pcm.allocation.AllocationContext> searchCriteria)
      Filters the allocation contexts which satisfies the given predicate.
      Parameters:
      searchCriteria - - The search criteria for filtering the allocation contexts.
      Returns:
      the first filtered component.
    • getAllocationContextContaining

      public org.palladiosimulator.pcm.allocation.AllocationContext getAllocationContextContaining(org.palladiosimulator.pcm.repository.RepositoryComponent allocatedComponent) throws FCCWeaverException
      Returns the allocation contexts which allocates a given component. Therefore, it is assumed that the input component is only allocated once.
      Parameters:
      allocatedComponent - - The component whose allocation context is supposed to be retrieved.
      Returns:
      the allocation context allocating the given component.
      Throws:
      FCCWeaverException - - Will be thrown if the resulting size of the filtered allocation contexts is not one.
    • existAllocationContextWith

      public boolean existAllocationContextWith(org.palladiosimulator.pcm.core.composition.AssemblyContext assemblyContext)
      Checks if there exist at least one allocation context that allocates a given assembly context.
      Parameters:
      assemblyContext - - The assembly context that is suppose to be checked.
      Returns:
      true if the assembly context is allocated and false if not.
    • addAllocationContext

      public void addAllocationContext(org.palladiosimulator.pcm.allocation.AllocationContext allocationContext)
      Adds an allocation context to the PCM allocation.
      Parameters:
      allocationContext - - The allocation context to add.
    • createAllocationContextBy

      public org.palladiosimulator.pcm.allocation.AllocationContext createAllocationContextBy(org.palladiosimulator.pcm.core.composition.AssemblyContext assemblyContext, org.palladiosimulator.pcm.resourceenvironment.ResourceContainer resourceContainer)
      Creates a new allocation context.
      Parameters:
      assemblyContext - - The assembly context that is suppose to be allocated.
      resourceContainer - - The resource container the assembly context is allocated on.
      Returns:
      the newly created allocation context.