Package jline.lang.layered
Class Activity
java.lang.Object
jline.lang.Element
jline.lang.layered.LayeredNetworkElement
jline.lang.layered.Activity
- All Implemented Interfaces:
Serializable,Copyable
An Activity represents an individual processing step or service operation within a Task
in a layered queueing network.
Activities are the fundamental units of work that define what processing happens when a request is served by a task. They encapsulate:
- Resource demands (CPU time, I/O operations, etc.)
- Service calls to other tasks (synchronous and asynchronous)
- Processing logic and execution flow
- Binding relationships with entries that trigger them
Key characteristics:
- Host demand: The computational resources required on the processor
- Service calls: Requests made to other tasks during execution
- Call ordering: Whether calls are made deterministically or stochastically
- Entry binding: Which entry point triggers this activity
- Reply activity: Whether this activity sends replies back to callers
Activities can make both synchronous calls (blocking until response) and asynchronous calls (fire-and-forget) to other task entries. They are connected through ActivityPrecedence relationships to form complex execution graphs.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA set of call targets dispatched as one group by a routing strategy.Nested classes/interfaces inherited from class jline.lang.layered.LayeredNetworkElement
LayeredNetworkElement.LinConRow, LayeredNetworkElement.ServerPool -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Matrixprotected Stringprotected Stringprotected Distributionprotected doubleprotected doubleprotected Taskprotected intprotected Matrixprotected List<Activity.CallGroup>Call groups dispatched by a routing strategy instead of independently.protected Matrixprotected Distributionprotected doubleprotected doubleFields inherited from class jline.lang.layered.LayeredNetworkElement
ACTIVITY, CALL, ENTRY, HOST, lcdScaling, lcdScalingPeak, linConA, linConB, linConRows, ljdScaling, ljdScalingPeak, lldScaling, model, PROCESSOR, serverPools, TASK -
Constructor Summary
ConstructorsConstructorDescriptionActivity(LayeredNetwork model, String name) Activity(LayeredNetwork model, String name, Distribution hostDemand) Activity(LayeredNetwork model, String name, Distribution hostDemand, String boundToEntry) Activity(LayeredNetwork model, String name, Distribution hostDemand, String boundToEntry, String callOrder) -
Method Summary
Modifier and TypeMethodDescriptionasynchCall(String asynchCallDest) asynchCall(String asynchCallDest, double asynchCallMean) asynchCall(Entry asynchCallDest) asynchCall(Entry asynchCallDest, double asynchCallMean) doubledoubleintgetPhase()Get the phase number for this activity.doubledoublerecordCallGroup(RoutingStrategy strategy, List<String> destNames) Records the grouping of synchronous calls this activity ALREADY declares.setAsyncCallMeans(double asyncCallMean) setAsyncCallMeans(Matrix asyncCallMeans) setCallOrder(String callOrder) voidsetHostDemand(double hostDemand) voidsetHostDemand(Distribution hostDemand) voidsetPhase(int phase) Set the phase number for this activity.setSyncCallMeans(double syncCallMean) setSyncCallMeans(Matrix syncCallMeans) voidsetThinkTime(double thinkTime) voidsetThinkTime(Distribution thinkTime) synchCallJSQ(List<Entry> synchCallDests, double synchCallMean) Dispatch synchronous calls to the least loaded of a set of target entries.synchCallRoundRobin(List<Entry> synchCallDests, double synchCallMean) Dispatch synchronous calls round-robin over a set of target entries.Methods inherited from class jline.lang.layered.LayeredNetworkElement
addConstraint, addConstraintByName, addServerType, getLinearConstraints, getServerTypes, hasLinearConstraints, hasRateDependence, hasServerPools, setClassDependence, setConstraint, setJointDependence, setLoadDependence
-
Field Details
-
hostDemand
-
hostDemandMean
protected double hostDemandMean -
hostDemandSCV
protected double hostDemandSCV -
parent
-
boundToEntry
-
callOrder
-
syncCallDests
-
syncCallMeans
-
asyncCallDests
-
asyncCallMeans
-
syncCallGroups
Call groups dispatched by a routing strategy instead of independently. The calls themselves stay in syncCallDests/syncCallMeans so every consumer that ignores dispatch order still sees the same aggregate call means. -
scheduling
-
thinkTime
-
thinkTimeMean
protected double thinkTimeMean -
thinkTimeSCV
protected double thinkTimeSCV -
phase
protected int phase
-
-
Constructor Details
-
Activity
public Activity(LayeredNetwork model, String name, Distribution hostDemand, String boundToEntry, String callOrder) -
Activity
-
Activity
-
Activity
-
-
Method Details
-
getSyncCallGroups
-
asynchCall
-
asynchCall
-
asynchCall
-
asynchCall
-
boundTo
-
boundTo
-
on
-
repliesTo
-
setCallOrder
-
setHostDemand
public void setHostDemand(double hostDemand) -
setHostDemand
-
setParent
-
setThinkTime
-
setThinkTime
public void setThinkTime(double thinkTime) -
getThinkTime
-
getThinkTimeMean
public double getThinkTimeMean() -
getThinkTimeSCV
public double getThinkTimeSCV() -
getHostDemand
-
getHostDemandMean
public double getHostDemandMean() -
getHostDemandSCV
public double getHostDemandSCV() -
getCallOrder
-
getBoundToEntry
-
getPhase
public int getPhase()Get the phase number for this activity. Phase 1: activities before the reply is sent Phase 2: activities after the reply is sent (post-reply processing)- Returns:
- The phase number (1 or 2)
-
setPhase
Set the phase number for this activity. Phase 1: activities before the reply is sent Phase 2: activities after the reply is sent (post-reply processing)- Parameters:
phase- The phase number (must be 1 or 2)- Returns:
- This activity for method chaining
-
synchCallRoundRobin
Dispatch synchronous calls round-robin over a set of target entries. synchCallMean is the total mean number of calls the activity issues per invocation; successive calls go to the targets in cyclic order, so each target receives synchCallMean/entries.size() of them. The probabilistic model with the same per-target means is the ungrouped equivalent: the group adds the deterministic interleaving, not a different call rate. Only the squashed ("flat") layering can represent this, because under "srvn" the targets never share a submodel.- Parameters:
synchCallDests- - the target entries, at least twosynchCallMean- - total mean calls per invocation- Returns:
- this activity
-
synchCallJSQ
Dispatch synchronous calls to the least loaded of a set of target entries. Same contract as synchCallRoundRobin, with the cyclic pointer replaced by join-the-shortest-queue: each call goes to the target task whose station holds the fewest jobs at dispatch time, ties split uniformly. Only the squashed ("flat") layering can represent this, and only a layer solver with state-dependent routing honours it.- Parameters:
synchCallDests- - the target entries, at least twosynchCallMean- - total mean calls per invocation- Returns:
- this activity
-
recordCallGroup
Records the grouping of synchronous calls this activity ALREADY declares. addCallGroup issues the member calls and then records them; the .lqnx reader has read them back as ordinary synch-call elements, so it records the grouping alone and must not issue them a second time.- Parameters:
strategy- - the dispatch strategy over the groupdestNames- - the target entry names, at least two- Returns:
- this activity
-
synchCall
-
synchCall
-
synchCall
-
synchCall
-
getParent
-
getSyncCallDests
-
getSyncCallMeans
-
setSyncCallMeans
-
setSyncCallMeans
-
getAsyncCallDests
-
getAsyncCallMeans
-
setAsyncCallMeans
-
setAsyncCallMeans
-