Class AbstractDemandModifyingBehaviorStrategy
java.lang.Object
org.palladiosimulator.simulizar.failurescenario.interpreter.strategies.AbstractDemandModifyingBehaviorStrategy
- All Implemented Interfaces:
FailureBehaviorChangingStrategy
- Direct Known Subclasses:
AddDemandModifyingBehaviorStrategy
,RemoveDemandModifyingBehaviorStrategy
public abstract class AbstractDemandModifyingBehaviorStrategy
extends Object
implements FailureBehaviorChangingStrategy
-
Field Summary
Modifier and TypeFieldDescriptionprotected de.uka.ipd.sdq.simucomframework.resources.DemandModifyingBehavior
protected de.uka.ipd.sdq.simucomframework.resources.IResourceDemandModifiable
-
Constructor Summary
ConstructorDescriptionAbstractDemandModifyingBehaviorStrategy
(de.uka.ipd.sdq.simucomframework.resources.IResourceDemandModifiable modifiableResource, de.uka.ipd.sdq.simucomframework.resources.DemandModifyingBehavior behavior) -
Method Summary
Modifier and TypeMethodDescriptionboolean
allocateContext
(StrategyAllocationContext allocationContext) Allocate the strategies context.abstract void
execute()
Executes the strategy.abstract FailureBehaviorChangingStrategy
boolean
isValid()
Checks if the strategys context has been allocated.void
setDecider
(BehavioralDecider decider) Sets a Decider to the Behavior.
-
Field Details
-
modifiableResource
protected de.uka.ipd.sdq.simucomframework.resources.IResourceDemandModifiable modifiableResource -
behavior
protected de.uka.ipd.sdq.simucomframework.resources.DemandModifyingBehavior behavior
-
-
Constructor Details
-
AbstractDemandModifyingBehaviorStrategy
public AbstractDemandModifyingBehaviorStrategy(de.uka.ipd.sdq.simucomframework.resources.IResourceDemandModifiable modifiableResource, de.uka.ipd.sdq.simucomframework.resources.DemandModifyingBehavior behavior)
-
-
Method Details
-
execute
public abstract void execute()Description copied from interface:FailureBehaviorChangingStrategy
Executes the strategy. Before, you should test if this call is possible by calling isValid().- Specified by:
execute
in interfaceFailureBehaviorChangingStrategy
-
getRevertedStrategy
- Specified by:
getRevertedStrategy
in interfaceFailureBehaviorChangingStrategy
-
setDecider
Description copied from interface:FailureBehaviorChangingStrategy
Sets a Decider to the Behavior.- Specified by:
setDecider
in interfaceFailureBehaviorChangingStrategy
-
isValid
public boolean isValid()Description copied from interface:FailureBehaviorChangingStrategy
Checks if the strategys context has been allocated.- Specified by:
isValid
in interfaceFailureBehaviorChangingStrategy
- Returns:
- true if context is allocated.
-
allocateContext
Description copied from interface:FailureBehaviorChangingStrategy
Allocate the strategies context.- Specified by:
allocateContext
in interfaceFailureBehaviorChangingStrategy
- Returns:
- Returns false if it was impossible to allocate the strategy.
-