Class WorkflowActivity

java.lang.Object
jline.lang.Element
jline.lang.workflow.WorkflowActivity
All Implemented Interfaces:
Serializable, Copyable

public class WorkflowActivity extends Element
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:
  • Constructor Details

    • WorkflowActivity

      public WorkflowActivity(Workflow workflow, String name, double meanServiceTime)
    • WorkflowActivity

      public WorkflowActivity(Workflow workflow, String name, Distribution hostDemand)
  • Method Details

    • setHostDemand

      public void setHostDemand(double meanServiceTime)
    • setHostDemand

      public void setHostDemand(Distribution hostDemand)
    • 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

      public Distribution getHostDemand()
    • getHostDemandMean

      public double getHostDemandMean()
    • getHostDemandSCV

      public double getHostDemandSCV()
    • getWorkflow

      public Workflow getWorkflow()
    • getIndex

      public int getIndex()
    • setIndex

      public void setIndex(int index)
    • getPHRepresentation

      public Pair<Matrix,Matrix> getPHRepresentation()
    • getNumberOfPhases

      public int getNumberOfPhases()
    • getMetadata

      public Map<String,Object> getMetadata()
      Get optional metadata (e.g., from WfCommons).
      Returns:
      Metadata map or null if not set
    • setMetadata

      public void setMetadata(Map<String,Object> metadata)
      Set optional metadata.
      Parameters:
      metadata - Metadata map
    • hasMetadata

      public boolean hasMetadata()
      Check if metadata is present.
      Returns:
      true if metadata is set
    • getMetadataValue

      public Object getMetadataValue(String key)
      Get a metadata value by key.
      Parameters:
      key - Metadata key
      Returns:
      Value or null if not present
    • setMetadataValue

      public void setMetadataValue(String key, Object value)
      Set a metadata value.
      Parameters:
      key - Metadata key
      value - Metadata value