Class LoopActionCreator
- java.lang.Object
-
- org.palladiosimulator.generator.fluent.shared.structure.Entity
-
- org.palladiosimulator.generator.fluent.repository.structure.RepositoryEntity
-
- org.palladiosimulator.generator.fluent.repository.structure.components.seff.SeffAction
-
- org.palladiosimulator.generator.fluent.repository.structure.components.seff.GeneralAction
-
- org.palladiosimulator.generator.fluent.repository.structure.components.seff.LoopActionCreator
-
public class LoopActionCreator extends GeneralAction
This class constructs aLoopAction
. It is used to create the 'LoopAction' object step-by-step, i.e. 'LoopActionCreator' objects are of intermediate state.- See Also:
LoopAction
-
-
Field Summary
-
Fields inherited from class org.palladiosimulator.generator.fluent.repository.structure.components.seff.GeneralAction
demands, infrastructureCalls, resourceCalls
-
Fields inherited from class org.palladiosimulator.generator.fluent.repository.structure.components.seff.SeffAction
seff
-
Fields inherited from class org.palladiosimulator.generator.fluent.repository.structure.RepositoryEntity
repository
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
LoopActionCreator(SeffCreator seff)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.palladiosimulator.pcm.seff.LoopAction
build()
Turns the entity in the making into the finished entity.LoopActionCreator
withInfrastructureCall(String numberOfCallsStochasticExpression, org.palladiosimulator.pcm.repository.InfrastructureSignature signature, org.palladiosimulator.pcm.repository.InfrastructureRequiredRole requiredRole, VariableUsageCreator... variableUsages)
Adds anInfrastructureCall
to this action.LoopActionCreator
withIterationCount(String iterationCountStochasticExpression)
Specifies the number of repetitions the inner ResourceDemandingBehaviour is executed.LoopActionCreator
withLoopBody(Seff loopBody)
Specifies the inner ResourceDemandingBehaviour representing the loop body.LoopActionCreator
withName(String name)
Defines the unique name of this current entity.LoopActionCreator
withResourceCall(String numberOfCallsStochasticExpression, ResourceSignature signature, org.palladiosimulator.pcm.core.entity.ResourceRequiredRole requiredRole, VariableUsageCreator... variableUsages)
Adds aResourceCall
to this action.LoopActionCreator
withResourceDemand(String specificationStochasticExpression, ProcessingResource processingResource)
Adds aParametricResourceDemand
to this action.-
Methods inherited from class org.palladiosimulator.generator.fluent.repository.structure.components.seff.SeffAction
followedBy
-
-
-
-
Constructor Detail
-
LoopActionCreator
protected LoopActionCreator(SeffCreator seff)
-
-
Method Detail
-
withName
public LoopActionCreator withName(String name)
Description copied from class:Entity
Defines the unique name of this current entity. Once created entities are referenced by this name. Only entities with a unique name can be fetched from the model.
-
withIterationCount
public LoopActionCreator withIterationCount(String iterationCountStochasticExpression)
Specifies the number of repetitions the inner ResourceDemandingBehaviour is executed.The number of repetitions is specified by a random variable evaluating to integer or an IntPMF. The number of iterations specified by the random variable always needs to be bounded, i.e., the probabilities in an IntPMF for iteration numbers above a certain threshold must be zero. Otherwise, it would be possible that certain requests do not terminate, which would complicate performance analyses. The stochastic expression defining the iteration random variable may include references to input or component parameters to model dependencies between the usage profile and the number of loop iterations.
- Parameters:
iterationCountStochasticExpression
-- Returns:
- this loop action in the making
- See Also:
LoopAction
-
withLoopBody
public LoopActionCreator withLoopBody(Seff loopBody)
Specifies the inner ResourceDemandingBehaviour representing the loop body.Notice, that loop actions should only be modeled if the loop body contains either external service calls or resource demands directed at special resources. Otherwise, control flow loops in component behaviour should be abstracted by subsuming them in InternalAction, which combine a number of instructions.
- Parameters:
loopBody
-- Returns:
- this loop action in the making
-
withResourceDemand
public LoopActionCreator withResourceDemand(String specificationStochasticExpression, ProcessingResource processingResource)
Description copied from class:GeneralAction
Adds aParametricResourceDemand
to this action.Parametric Resource Demand specifies the amount of processing requested from a certain type of resource in a parameterized way. It assigns the demand specified as a Random-Variable (
specification_stochasticExpression
) to an abstract ProcessingResourceTypeprocessingResource
(e.g., CPU, hard disk) instead of a concrete ProcessingResourceSpecification (e.g., 5 GHz CPU, 20 MByte/s hard disk).- Overrides:
withResourceDemand
in classGeneralAction
- Returns:
- this action in the making
-
withInfrastructureCall
public LoopActionCreator withInfrastructureCall(String numberOfCallsStochasticExpression, org.palladiosimulator.pcm.repository.InfrastructureSignature signature, org.palladiosimulator.pcm.repository.InfrastructureRequiredRole requiredRole, VariableUsageCreator... variableUsages)
Description copied from class:GeneralAction
Adds anInfrastructureCall
to this action.- Overrides:
withInfrastructureCall
in classGeneralAction
- Returns:
- this action in the making
-
withResourceCall
public LoopActionCreator withResourceCall(String numberOfCallsStochasticExpression, ResourceSignature signature, org.palladiosimulator.pcm.core.entity.ResourceRequiredRole requiredRole, VariableUsageCreator... variableUsages)
Description copied from class:GeneralAction
Adds aResourceCall
to this action.- Overrides:
withResourceCall
in classGeneralAction
- Returns:
- this action in the making
-
build
protected org.palladiosimulator.pcm.seff.LoopAction build()
Description copied from class:Entity
Turns the entity in the making into the finished entity.- Specified by:
build
in classSeffAction
- Returns:
- the finished entity
-
-