Package jline.lang.layered
Class Task
-
- All Implemented Interfaces:
-
java.io.Serializable
,jline.lang.Copyable
public class Task extends LayeredNetworkElement
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.
-
-
Field Summary
Fields Modifier and Type Field Description protected Processor
parent
protected int
multiplicity
protected int
replication
protected SchedStrategy
scheduling
protected Distribution
thinkTime
protected double
thinkTimeMean
protected double
thinkTimeSCV
protected List<Entry>
entries
protected List<Activity>
activities
protected List<ActivityPrecedence>
precedences
public final static int
ACTIVITY
public final static int
CALL
public final static int
ENTRY
public final static int
HOST
public final static int
PROCESSOR
public final static int
TASK
public LayeredNetwork
model
protected String
name
-
Constructor Summary
Constructors Constructor Description Task(LayeredNetwork model, String name, int multiplicity, SchedStrategy scheduling, Distribution thinkTime)
Task(LayeredNetwork model, String name, int multiplicity, SchedStrategy scheduling)
Task(LayeredNetwork model, String name, int multiplicity)
Task(LayeredNetwork model, String name)
-
Method Summary
Modifier and Type Method Description Task
addActivity(Activity newActivity)
Task
addEntry(Entry newEntry)
Task
addPrecedence(ActivityPrecedence newPrec)
Task
addPrecedence(List<ActivityPrecedence> newPrec)
Task
addPrecedence(Array<ActivityPrecedence> newPrec)
double
getMeanHostDemand(String entryName)
Task
on(Processor parent)
Task
removeActivity(int index)
Task
setActivity(Activity newActivity, int index)
Task
setAsReferenceTask()
Task
setReplication(int replication)
Task
setThinkTime(Distribution thinkTime)
Task
setThinkTime(double thinkTime)
Task
setReplyEntry(List<Entry> replyEntry)
-
-
Constructor Detail
-
Task
Task(LayeredNetwork model, String name, int multiplicity, SchedStrategy scheduling, Distribution thinkTime)
-
Task
Task(LayeredNetwork model, String name, int multiplicity, SchedStrategy scheduling)
-
Task
Task(LayeredNetwork model, String name, int multiplicity)
-
Task
Task(LayeredNetwork model, String name)
-
-
Method Detail
-
addActivity
Task addActivity(Activity newActivity)
-
addPrecedence
Task addPrecedence(ActivityPrecedence newPrec)
-
addPrecedence
Task addPrecedence(List<ActivityPrecedence> newPrec)
-
addPrecedence
Task addPrecedence(Array<ActivityPrecedence> newPrec)
-
getMeanHostDemand
double getMeanHostDemand(String entryName)
-
removeActivity
Task removeActivity(int index)
-
setActivity
Task setActivity(Activity newActivity, int index)
-
setAsReferenceTask
Task setAsReferenceTask()
-
setReplication
Task setReplication(int replication)
-
setThinkTime
Task setThinkTime(Distribution thinkTime)
-
setThinkTime
Task setThinkTime(double thinkTime)
-
setReplyEntry
Task setReplyEntry(List<Entry> replyEntry)
-
-
-
-