Package jline.lang.layered
Class Task
java.lang.Object
jline.lang.Element
jline.lang.layered.LayeredNetworkElement
jline.lang.layered.Task
- All Implemented Interfaces:
Serializable,Copyable
A Task represents a software component or process in a layered queueing network that can host
services (Entry objects) and runs on a Processor (Host).
Tasks are fundamental building blocks in layered queueing networks that encapsulate:
- Service entries that define the interfaces accessible to other tasks
- Activities that represent internal processing steps
- Activity precedences that define the execution order and relationships
- Resource demands and scheduling policies
Key characteristics:
- Multiplicity: Number of concurrent task instances that can execute
- Scheduling: How the task schedules its internal processing (FCFS, PS, etc.)
- Think time: Time between completing one request and starting the next
- Reference tasks: Special tasks that generate workload (external customers)
Tasks can be reference tasks (SchedStrategy.REF) that represent external workload generators, or regular tasks that provide services to other tasks in the system.
-
Nested Class Summary
Nested classes/interfaces inherited from class jline.lang.layered.LayeredNetworkElement
LayeredNetworkElement.LinConRow, LayeredNetworkElement.ServerPool -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Distributionprotected doubleprotected doubleprotected Stringprotected intprotected intprotected Processorprotected List<ActivityPrecedence>protected intprotected intprotected SchedStrategyprotected Distributionprotected doubleprotected doubleprotected 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
ConstructorsConstructorDescriptionTask(LayeredNetwork model, String name) Task(LayeredNetwork model, String name, int multiplicity) Task(LayeredNetwork model, String name, int multiplicity, SchedStrategy scheduling) Task(LayeredNetwork model, String name, int multiplicity, SchedStrategy scheduling, Distribution thinkTime) -
Method Summary
Modifier and TypeMethodDescriptionaddActivity(Activity newActivity) addPrecedence(List<ActivityPrecedence> newPrec) addPrecedence(ActivityPrecedence newPrec) addPrecedence(ActivityPrecedence[] newPrec) Returns the list of activities for this task.doubledoubleReturns the list of entries for this task.intdoublegetMeanHostDemand(String entryName) intintReturns the processor (host) that this task runs on.intdoubledoubleThink-time distribution, or null when none was set.doubledoublebooleanCheck if this task has setup/delayoff configured (i.e., non-trivial values).removeActivity(int index) setActivity(Activity newActivity, int index) setDelayOffTime(double delayOffTime) Set the delay-off time using a mean value (creates exponential distribution).setDelayOffTime(Distribution delayOffTime) Set the delay-off time (teardown time) for the task.voidsetMultiplicity(int multiplicity) setPriority(int priority) setReplication(int replication) setReplyEntry(List<Entry> replyEntry) voidsetScheduling(SchedStrategy scheduling) setSetupTime(double setupTime) Set the setup time using a mean value (creates exponential distribution).setSetupTime(Distribution setupTime) Set the setup time (cold start time) for the task.setThinkTime(double thinkTime) setThinkTime(Distribution thinkTime) Methods inherited from class jline.lang.layered.LayeredNetworkElement
addConstraint, addConstraintByName, addServerType, getLinearConstraints, getServerTypes, hasLinearConstraints, hasRateDependence, hasServerPools, setClassDependence, setConstraint, setJointDependence, setLoadDependence
-
Field Details
-
parent
-
multiplicity
protected int multiplicity -
replication
protected int replication -
scheduling
-
priority
protected int priority -
fanInSource
-
fanInValue
protected int fanInValue -
fanOutMap
-
thinkTime
-
thinkTimeMean
protected double thinkTimeMean -
thinkTimeSCV
protected double thinkTimeSCV -
setupTime
-
setupTimeMean
protected double setupTimeMean -
setupTimeSCV
protected double setupTimeSCV -
delayOffTime
-
delayOffTimeMean
protected double delayOffTimeMean -
delayOffTimeSCV
protected double delayOffTimeSCV -
entries
-
activities
-
precedences
-
-
Constructor Details
-
Task
public Task(LayeredNetwork model, String name, int multiplicity, SchedStrategy scheduling, Distribution thinkTime) -
Task
-
Task
-
Task
-
-
Method Details
-
addActivity
-
addEntry
-
addPrecedence
-
addPrecedence
-
addPrecedence
-
getMeanHostDemand
-
on
-
removeActivity
-
setActivity
-
setAsReferenceTask
-
setReplication
-
setReplyEntry
-
setThinkTime
-
setThinkTime
-
setSetupTime
Set the setup time (cold start time) for the task.- Parameters:
setupTime- The setup time distribution- Returns:
- This Task instance for method chaining
-
setSetupTime
Set the setup time using a mean value (creates exponential distribution).- Parameters:
setupTime- The mean setup time- Returns:
- This Task instance for method chaining
-
setDelayOffTime
Set the delay-off time (teardown time) for the task.- Parameters:
delayOffTime- The delay-off time distribution- Returns:
- This Task instance for method chaining
-
setDelayOffTime
Set the delay-off time using a mean value (creates exponential distribution).- Parameters:
delayOffTime- The mean delay-off time- Returns:
- This Task instance for method chaining
-
getThinkTime
Think-time distribution, or null when none was set. -
getSetupTime
-
getSetupTimeMean
public double getSetupTimeMean() -
getSetupTimeSCV
public double getSetupTimeSCV() -
getDelayOffTime
-
getDelayOffTimeMean
public double getDelayOffTimeMean() -
getDelayOffTimeSCV
public double getDelayOffTimeSCV() -
getMultiplicity
public int getMultiplicity() -
getReplication
public int getReplication() -
getScheduling
-
getThinkTimeMean
public double getThinkTimeMean() -
getThinkTimeSCV
public double getThinkTimeSCV() -
getParent
-
setMultiplicity
public void setMultiplicity(int multiplicity) -
setScheduling
-
getPrecedences
-
hasSetupDelayoff
public boolean hasSetupDelayoff()Check if this task has setup/delayoff configured (i.e., non-trivial values).- Returns:
- true if setup time or delay-off time is configured with non-immediate values
-
getEntries
Returns the list of entries for this task.- Returns:
- the list of entries
-
getActivities
Returns the list of activities for this task.- Returns:
- the list of activities
-
getProcessor
Returns the processor (host) that this task runs on.- Returns:
- the parent processor
-
setPriority
-
getPriority
public int getPriority() -
setFanIn
-
getFanInSource
-
getFanInValue
public int getFanInValue() -
setFanOut
-
getFanOutMap
-