Class SetupTask

All Implemented Interfaces:
Serializable, Copyable
Direct Known Subclasses:
FunctionTask

public class SetupTask extends Task
SetupTask is a Task whose servers are switched off while idle.

A server that resumes from the off state pays a setup (activation) time before serving the request that woke it up, and it stays available for a delay-off (idle) period after emptying its queue before switching off again. These are the setup and close-down times of a server with vacations; they model on-demand virtual machines and containers, power-managed servers under a timeout policy, warm-up delays, and serverless cold start / keep-alive.

Both times are declared on the base Task class through setSetupTime() and setDelayOffTime(), so this subclass is a naming convenience: a plain Task carrying either time behaves identically.

See Also:
  • Constructor Details

    • SetupTask

      public SetupTask(LayeredNetwork model, String name, int multiplicity, SchedStrategy scheduling)
      Constructor for SetupTask.
      Parameters:
      model - The LayeredNetwork model this task belongs to
      name - The name of the task
      multiplicity - The number of servers that can run concurrently
      scheduling - The scheduling strategy for the servers
    • SetupTask

      public SetupTask(LayeredNetwork model, String name, int multiplicity)
      Constructor with default scheduling strategy (FCFS).
    • SetupTask

      public SetupTask(LayeredNetwork model, String name)
      Constructor with default multiplicity and scheduling.
  • Method Details

    • on

      public SetupTask on(Processor parent)
      Overrides:
      on in class Task
    • setThinkTime

      public SetupTask setThinkTime(Distribution thinkTime)
      Overrides:
      setThinkTime in class Task
    • setThinkTime

      public SetupTask setThinkTime(double thinkTime)
      Overrides:
      setThinkTime in class Task
    • setSetupTime

      public SetupTask setSetupTime(Distribution setupTime)
      Description copied from class: Task
      Set the setup time (cold start time) for the task.
      Overrides:
      setSetupTime in class Task
      Parameters:
      setupTime - The setup time distribution
      Returns:
      This Task instance for method chaining
    • setSetupTime

      public SetupTask setSetupTime(double setupTime)
      Description copied from class: Task
      Set the setup time using a mean value (creates exponential distribution).
      Overrides:
      setSetupTime in class Task
      Parameters:
      setupTime - The mean setup time
      Returns:
      This Task instance for method chaining
    • setDelayOffTime

      public SetupTask setDelayOffTime(Distribution delayOffTime)
      Description copied from class: Task
      Set the delay-off time (teardown time) for the task.
      Overrides:
      setDelayOffTime in class Task
      Parameters:
      delayOffTime - The delay-off time distribution
      Returns:
      This Task instance for method chaining
    • setDelayOffTime

      public SetupTask setDelayOffTime(double delayOffTime)
      Description copied from class: Task
      Set the delay-off time using a mean value (creates exponential distribution).
      Overrides:
      setDelayOffTime in class Task
      Parameters:
      delayOffTime - The mean delay-off time
      Returns:
      This Task instance for method chaining