Class FunctionTask

  • All Implemented Interfaces:
    java.io.Serializable , jline.lang.Copyable

    @Deprecated() 
    public class FunctionTask
    extends Task
                        

    FunctionTask is an alias for Task, provided for backward compatibility.

    All setup/delayoff functionality has been moved to the base Task class. Any Task can now have setup time (cold start delay) and delay-off time (teardown delay) configured via setSetupTime() and setDelayOffTime().

    This class is retained for backward compatibility with existing code that uses FunctionTask to model serverless functions or tasks with initialization overhead.

    • Constructor Detail

      • FunctionTask

        FunctionTask(LayeredNetwork model, String name, int multiplicity, SchedStrategy scheduling)
        Constructor for FunctionTask.
        Parameters:
        model - The LayeredNetwork model this task belongs to
        name - The name of the function task
        multiplicity - The number of function instances that can run concurrently
        scheduling - 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 task.

        Parameters:
        setupTime - The setup time distribution
        Returns:

        This Task 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 Task instance for method chaining

      • setDelayOffTime

         FunctionTask setDelayOffTime(Distribution delayOffTime)

        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

         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 Task instance for method chaining