Class ProcessingResourceDescriptor
java.lang.Object
org.palladiosimulator.reliability.solver.pcm2markov.ProcessingResourceDescriptor
Describes the characteristics of a PCM processing resource with respect to its availability.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGets the current resource state.Returns the default state of this resource.Gets the id of the surrounding resource container.Gets the name of the surrounding resource container.Retrieves the probability of a given resource state.getType()
Retrieves the resource type.boolean
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
Sets the current resource state.void
Sets the resource type id.void
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
Switches the state from either ProcessingResourceState.OK to ProcessingResourceState.NA or ProcessingResourceState.NA to ProcessingResourceState.OK.
-
Constructor Details
-
ProcessingResourceDescriptor
public ProcessingResourceDescriptor()The constructor.
-
-
Method Details
-
getCurrentState
Gets the current resource state.- Returns:
- the current state
-
getDefaultState
Returns the default state of this resource.- Returns:
- the default state
-
getResourceContainerId
Gets the id of the surrounding resource container.- Returns:
- the id
-
getResourceContainerName
Gets the name of the surrounding resource container.- Returns:
- the name
-
getStateProbability
Retrieves the probability of a given resource state.- Parameters:
state
- the resource state- Returns:
- the probability
-
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
Sets the id of the surrounding resource container.- Parameters:
resourceContainerId
- the id to set
-
setContainerName
Sets the name of the surrounding resource container.- Parameters:
resourceContainerName
- the name to set
-
setCurrentState
Sets the current resource state.- Parameters:
state
- the state to set
-
setId
Sets the resource type id.- Parameters:
typeId
- the resource type id to set
-
setName
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
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.
-