Package jline.lang.layered
Class FunctionTask
-
- All Implemented Interfaces:
-
java.io.Serializable,jline.lang.Copyable
public class FunctionTask extends Task
A specialized Task for modeling serverless functions and function-as-a-service (FaaS) systems. FunctionTask extends the basic Task with additional properties for modeling cold start delays (setupTime) and teardown delays (delayOffTime) that are characteristic of serverless computing environments.
-
-
Field Summary
Fields Modifier and Type Field Description protected DistributionsetupTimeprotected doublesetupTimeMeanprotected doublesetupTimeSCVprotected DistributiondelayOffTimeprotected doubledelayOffTimeMeanprotected doubledelayOffTimeSCVprotected Processorparentprotected intmultiplicityprotected intreplicationprotected SchedStrategyschedulingprotected DistributionthinkTimeprotected doublethinkTimeMeanprotected doublethinkTimeSCVprotected List<Entry>entriesprotected List<Activity>activitiesprotected List<ActivityPrecedence>precedencespublic final static intACTIVITYpublic final static intCALLpublic final static intENTRYpublic final static intHOSTpublic final static intPROCESSORpublic final static intTASKpublic LayeredNetworkmodelprotected Stringname
-
Constructor Summary
Constructors Constructor Description FunctionTask(LayeredNetwork model, String name, int multiplicity, SchedStrategy scheduling)Constructor for FunctionTask FunctionTask(LayeredNetwork model, String name, int multiplicity)Constructor with default scheduling strategy (FCFS) FunctionTask(LayeredNetwork model, String name)Constructor with default multiplicity and scheduling
-
Method Summary
Modifier and Type Method Description FunctionTasksetSetupTime(Distribution setupTime)Set the setup time (cold start time) for the function FunctionTasksetSetupTime(double setupTime)Set the setup time using a mean value (creates exponential distribution) FunctionTasksetDelayOffTime(Distribution delayOffTime)Set the delay-off time (teardown time) for the function FunctionTasksetDelayOffTime(double delayOffTime)Set the delay-off time using a mean value (creates exponential distribution) DistributiongetSetupTime()doublegetSetupTimeMean()doublegetSetupTimeSCV()DistributiongetDelayOffTime()doublegetDelayOffTimeMean()doublegetDelayOffTimeSCV()FunctionTaskon(Processor parent)FunctionTasksetThinkTime(Distribution thinkTime)FunctionTasksetThinkTime(double thinkTime)-
Methods inherited from class jline.lang.layered.Task
addActivity, addEntry, addPrecedence, addPrecedence, addPrecedence, getMeanHostDemand, removeActivity, setActivity, setAsReferenceTask, setReplication, setReplyEntry -
Methods inherited from class jline.lang.Element
getName, setName -
Methods inherited from class jline.lang.Copyable
copy -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
FunctionTask
FunctionTask(LayeredNetwork model, String name, int multiplicity, SchedStrategy scheduling)
Constructor for FunctionTask- Parameters:
model- The LayeredNetwork model this task belongs toname- The name of the function taskmultiplicity- The number of function instances that can run concurrentlyscheduling- The scheduling strategy for the function instances
-
FunctionTask
FunctionTask(LayeredNetwork model, String name, int multiplicity)
Constructor with default scheduling strategy (FCFS)
-
FunctionTask
FunctionTask(LayeredNetwork model, String name)
Constructor with default multiplicity and scheduling
-
-
Method Detail
-
setSetupTime
FunctionTask setSetupTime(Distribution setupTime)
Set the setup time (cold start time) for the function
- Parameters:
setupTime- The setup time distribution- Returns:
This FunctionTask instance for method chaining
-
setSetupTime
FunctionTask setSetupTime(double setupTime)
Set the setup time using a mean value (creates exponential distribution)
- Parameters:
setupTime- The mean setup time- Returns:
This FunctionTask instance for method chaining
-
setDelayOffTime
FunctionTask setDelayOffTime(Distribution delayOffTime)
Set the delay-off time (teardown time) for the function
- Parameters:
delayOffTime- The delay-off time distribution- Returns:
This FunctionTask instance for method chaining
-
setDelayOffTime
FunctionTask setDelayOffTime(double delayOffTime)
Set the delay-off time using a mean value (creates exponential distribution)
- Parameters:
delayOffTime- The mean delay-off time- Returns:
This FunctionTask instance for method chaining
-
getSetupTime
Distribution getSetupTime()
-
getSetupTimeMean
double getSetupTimeMean()
-
getSetupTimeSCV
double getSetupTimeSCV()
-
getDelayOffTime
Distribution getDelayOffTime()
-
getDelayOffTimeMean
double getDelayOffTimeMean()
-
getDelayOffTimeSCV
double getDelayOffTimeSCV()
-
on
FunctionTask on(Processor parent)
-
setThinkTime
FunctionTask setThinkTime(Distribution thinkTime)
-
setThinkTime
FunctionTask setThinkTime(double thinkTime)
-
-
-
-