Class AbstractAllocationStorage
java.lang.Object
org.palladiosimulator.protocom.framework.java.se.AbstractAllocationStorage
Manages the sets of container ID, name and allocated components
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
Returns the container of this current component.static Collection<ComponentAllocation>
getComponents
(String containerId) Returns a collection of components to a given container idstatic String
getContainerID
(String container) FIXME: Possible source of errors if two container have the same name?static Collection<String>
Returns a set of all container idsstatic String
getContainerName
(String containerId) static Collection<String>
Returns a set of all container namesstatic void
protected abstract void
static void
initSingleton
(AbstractAllocationStorage instance) static boolean
protected static void
saveContainerComponent
(String containerId, String containerName, Class<?> component, String assemblyContext) Stores a tuple of container ID, name and one component, as well as the assembly context of the component.static void
setActiveContainer
(String containerId) static void
setLocalMode
(boolean localMode)
-
Field Details
-
singleton
-
-
Constructor Details
-
AbstractAllocationStorage
public AbstractAllocationStorage()
-
-
Method Details
-
saveContainerComponent
protected static void saveContainerComponent(String containerId, String containerName, Class<?> component, String assemblyContext) Stores a tuple of container ID, name and one component, as well as the assembly context of the component.- Parameters:
containerId
- key, can be used multiple timescontainerName
- valuecomponent
- valueassemblyContext
- ID of the assembly context
-
getContainerName
-
getContainerID
FIXME: Possible source of errors if two container have the same name?- Parameters:
container
-- Returns:
-
getContainerIds
Returns a set of all container ids- Returns:
- Set of container ids
-
getContainerNames
Returns a set of all container names- Returns:
- Set of container names
-
getComponents
Returns a collection of components to a given container id- Parameters:
containerId
-- Returns:
- collection of components
-
initContainerTemplate
protected abstract void initContainerTemplate() -
initContainer
public static void initContainer() -
initSingleton
-
setActiveContainer
-
getActiveContainer
Returns the container of this current component. FIXME: Also returns the FIRST container if local mode is active, since no container has been (and can not be) chosen for this hardware node.- Returns:
-
setLocalMode
public static void setLocalMode(boolean localMode) -
isLocalMode
public static boolean isLocalMode()
-