Package jline.lang.workflow
Class WorkflowActivity
java.lang.Object
jline.lang.Element
jline.lang.workflow.WorkflowActivity
- All Implemented Interfaces:
Serializable,Copyable
A computational activity in a Workflow.
Unlike Activity in LayeredNetwork, it carries no call list: an external call is represented as an activity whose host demand is the law of the call response time, so that a synchronous call and a local computation compose in the same way. An asynchronous call blocks the caller for no time and is simply left out of the workflow.
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionWorkflowActivity(Workflow workflow, String name, double meanServiceTime) WorkflowActivity(Workflow workflow, String name, Distribution hostDemand) -
Method Summary
Modifier and TypeMethodDescriptiondoubledoubleintgetIndex()Get optional metadata (e.g., from WfCommons).getMetadataValue(String key) Get a metadata value by key.intbooleanCheck if metadata is present.voidsetHostDemand(double meanServiceTime) voidsetHostDemand(Distribution hostDemand) voidsetHostDemandMean(double meanValue) Change the mean, preserving the shape.voidsetIndex(int index) voidsetMetadata(Map<String, Object> metadata) Set optional metadata.voidsetMetadataValue(String key, Object value) Set a metadata value.
-
Constructor Details
-
WorkflowActivity
-
WorkflowActivity
-
-
Method Details
-
setHostDemand
public void setHostDemand(double meanServiceTime) -
setHostDemand
-
setHostDemandMean
public void setHostDemandMean(double meanValue) Change the mean, preserving the shape.Scales the current law in time rather than refitting it, so the SCV, the skewness and the order are preserved and the cached series-parallel tree keeps its shape.
- Parameters:
meanValue- new mean, positive and finite
-
getHostDemand
-
getHostDemandMean
public double getHostDemandMean() -
getHostDemandSCV
public double getHostDemandSCV() -
getWorkflow
-
getIndex
public int getIndex() -
setIndex
public void setIndex(int index) -
getPHRepresentation
-
getNumberOfPhases
public int getNumberOfPhases() -
getMetadata
Get optional metadata (e.g., from WfCommons).- Returns:
- Metadata map or null if not set
-
setMetadata
Set optional metadata.- Parameters:
metadata- Metadata map
-
hasMetadata
public boolean hasMetadata()Check if metadata is present.- Returns:
- true if metadata is set
-
getMetadataValue
Get a metadata value by key.- Parameters:
key- Metadata key- Returns:
- Value or null if not present
-
setMetadataValue
Set a metadata value.- Parameters:
key- Metadata keyvalue- Metadata value
-