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
FieldsModifier and TypeFieldDescriptionprotected de.uka.ipd.sdq.simucomframework.core.resources.DemandModifyingBehaviorprotected de.uka.ipd.sdq.simucomframework.core.resources.IResourceDemandModifiable -
Constructor Summary
ConstructorsConstructorDescriptionAbstractDemandModifyingBehaviorStrategy(de.uka.ipd.sdq.simucomframework.core.resources.IResourceDemandModifiable modifiableResource, de.uka.ipd.sdq.simucomframework.core.resources.DemandModifyingBehavior behavior) -
Method Summary
Modifier and TypeMethodDescriptionbooleanallocateContext(StrategyAllocationContext allocationContext) Allocate the strategies context.abstract voidexecute()Executes the strategy.abstract FailureBehaviorChangingStrategybooleanisValid()Checks if the strategys context has been allocated.voidsetDecider(BehavioralDecider decider) Sets a Decider to the Behavior.
-
Field Details
-
modifiableResource
protected de.uka.ipd.sdq.simucomframework.core.resources.IResourceDemandModifiable modifiableResource -
behavior
protected de.uka.ipd.sdq.simucomframework.core.resources.DemandModifyingBehavior behavior
-
-
Constructor Details
-
AbstractDemandModifyingBehaviorStrategy
public AbstractDemandModifyingBehaviorStrategy(de.uka.ipd.sdq.simucomframework.core.resources.IResourceDemandModifiable modifiableResource, de.uka.ipd.sdq.simucomframework.core.resources.DemandModifyingBehavior behavior)
-
-
Method Details
-
execute
public abstract void execute()Description copied from interface:FailureBehaviorChangingStrategyExecutes the strategy. Before, you should test if this call is possible by calling isValid().- Specified by:
executein interfaceFailureBehaviorChangingStrategy
-
getRevertedStrategy
- Specified by:
getRevertedStrategyin interfaceFailureBehaviorChangingStrategy
-
setDecider
Description copied from interface:FailureBehaviorChangingStrategySets a Decider to the Behavior.- Specified by:
setDeciderin interfaceFailureBehaviorChangingStrategy
-
isValid
public boolean isValid()Description copied from interface:FailureBehaviorChangingStrategyChecks if the strategys context has been allocated.- Specified by:
isValidin interfaceFailureBehaviorChangingStrategy- Returns:
- true if context is allocated.
-
allocateContext
Description copied from interface:FailureBehaviorChangingStrategyAllocate the strategies context.- Specified by:
allocateContextin interfaceFailureBehaviorChangingStrategy- Returns:
- Returns false if it was impossible to allocate the strategy.
-