Class ProcessingResourceDescriptor
- java.lang.Object
-
- org.palladiosimulator.solver.reliability.pcm2markov.ProcessingResourceDescriptor
-
public class ProcessingResourceDescriptor extends Object
Describes the characteristics of a PCM processing resource with respect to its availability.
-
-
Constructor Summary
Constructors Constructor Description ProcessingResourceDescriptor()
The constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MarkovResourceState
getCurrentState()
Gets the current resource state.MarkovResourceState
getDefaultState()
Returns the default state of this resource.String
getResourceContainerId()
Gets the id of the surrounding resource container.String
getResourceContainerName()
Gets the name of the surrounding resource container.Double
getStateProbability(MarkovResourceState state)
Retrieves the probability of a given resource state.MarkovResourceType
getType()
Retrieves the resource type.boolean
isRequiredByContainer()
Retrieves the availability relation to the surrounding resource container.void
setContainerId(String resourceContainerId)
Sets the id of the surrounding resource container.void
setContainerName(String resourceContainerName)
Sets the name of the surrounding resource container.void
setCurrentState(MarkovResourceState state)
Sets the current resource state.void
setId(String typeId)
Sets the resource type id.void
setName(String typeName)
Sets the resource type name.void
setRequiredByContainer(boolean requiredByContainer)
Sets the availability relation to the surrounding resource container.void
setStateProbability(MarkovResourceState state, Double probability)
Sets a probability for a given resource state.void
switchState()
Switches the state from either ProcessingResourceState.OK to ProcessingResourceState.NA or ProcessingResourceState.NA to ProcessingResourceState.OK.
-
-
-
Method Detail
-
getCurrentState
public MarkovResourceState getCurrentState()
Gets the current resource state.- Returns:
- the current state
-
getDefaultState
public MarkovResourceState getDefaultState()
Returns the default state of this resource.- Returns:
- the default state
-
getResourceContainerId
public String getResourceContainerId()
Gets the id of the surrounding resource container.- Returns:
- the id
-
getResourceContainerName
public String getResourceContainerName()
Gets the name of the surrounding resource container.- Returns:
- the name
-
getStateProbability
public Double getStateProbability(MarkovResourceState state)
Retrieves the probability of a given resource state.- Parameters:
state
- the resource state- Returns:
- the probability
-
getType
public MarkovResourceType getType()
Retrieves the resource type.- Returns:
- the resource type
-
isRequiredByContainer
public boolean isRequiredByContainer()
Retrieves the availability relation to the surrounding resource container.- Returns:
- the availability relation to the surrounding resource container
-
setContainerId
public void setContainerId(String resourceContainerId)
Sets the id of the surrounding resource container.- Parameters:
resourceContainerId
- the id to set
-
setContainerName
public void setContainerName(String resourceContainerName)
Sets the name of the surrounding resource container.- Parameters:
resourceContainerName
- the name to set
-
setCurrentState
public void setCurrentState(MarkovResourceState state)
Sets the current resource state.- Parameters:
state
- the state to set
-
setId
public void setId(String typeId)
Sets the resource type id.- Parameters:
typeId
- the resource type id to set
-
setName
public void setName(String typeName)
Sets the resource type name.- Parameters:
typeName
- the resource type name to set
-
setRequiredByContainer
public void setRequiredByContainer(boolean requiredByContainer)
Sets the availability relation to the surrounding resource container.- Parameters:
requiredByContainer
- the availability relation to the surrounding resource container
-
setStateProbability
public void setStateProbability(MarkovResourceState state, Double probability)
Sets a probability for a given resource state.- Parameters:
state
- the resource stateprobability
- the probability
-
switchState
public void switchState()
Switches the state from either ProcessingResourceState.OK to ProcessingResourceState.NA or ProcessingResourceState.NA to ProcessingResourceState.OK.
-
-