Task (cloudsim 3.1-SNAPSHOT API)

org.cloudbus.cloudsim.workflow

## Class Task

- java.lang.Object
- - org.cloudbus.cloudsim.workflow.Task

-     public class Task
      extends Object

  This class encapsulates a DAG Task. The task contains the actual Cloudlet to be executed, information about its dependencies (data and execution), and scheduling information.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Task(Cloudlet cl, int ownerId, double deadlineDag_)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addAntecessors(HashSet<Task> newAntecessors)`
    `void` | `addAntecessors(Task task)`
    `void` | `addChild(Task parent)`
    `void` | `addDataDependency(DataItem data)`
    `void` | `addOutput(DataItem data)`
    `void` | `addParent(Task parent)`
    `void` | `addReplica(Task task)`
    `void` | `addSuccessors(HashSet<Task> newSuccessors)`
    `void` | `addSuccessors(Task task)`
    `void` | `computeEarlieststart()`
    `void` | `computeLatestEnd(double deadline)`
    `void` | `computeSlackTime()`
    `HashSet<Task>` | `getAntecessors()`
    `double` | `getBasicExecTime()`
    `List<Task>` | `getChildren()`
    `Cloudlet` | `getCloudlet()`
    `List<DataItem>` | `getDataDependencies()`
    `double` | `getEarliestStart()`
    `double` | `getExecTime()`
    `int` | `getId()`
    `double` | `getLatestEnd()`
    `double` | `getOptExecTime()`
    `int` | `getOptIndexFreq()`
    `List<DataItem>` | `getOutput()`
    `List<Task>` | `getParents()`
    `double` | `getRatioSlackExec()`
    `List<Task>` | `getReplicas()`
    `double` | `getSlackTime()`
    `HashSet<Task>` | `getSuccessors()`
    `int` | `getVmId()`
    `void` | `hasFinished()` Communicates to the Task that its Cloudlet completed.
    `boolean` | `hasReplicas()`
    `boolean` | `isCritical()`
    `boolean` | `isDefined()`
    `boolean` | `isFinished()`
    `boolean` | `isReady()`
    `Task` | `longestChild()`
    `Task` | `longestParent()`
    `void` | `setCritical(boolean critical)`
    `void` | `setDefined(boolean defined)`
    `void` | `setEarliestStart(double earliestStart)`
    `void` | `setLatestEnd(double latestEnd)`
    `void` | `setOptExecTime(double optExecTime)`
    `void` | `setOptIndexFreq(int optIndexFreq)`
    `void` | `setSlackTime(double slackTime)`
    `void` | `setVmId(int vmId)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Task

          public Task(Cloudlet cl,
              int ownerId,
              double deadlineDag_)

  - ### Method Detail

    - #### computeEarlieststart

          public void computeEarlieststart()

    - #### computeLatestEnd

          public void computeLatestEnd(double deadline)

    - #### computeSlackTime

          public void computeSlackTime()

    - #### longestParent

          public Task longestParent()

    - #### longestChild

          public Task longestChild()

    - #### getId

          public int getId()

    - #### addParent

          public void addParent(Task parent)

    - #### getParents

          public List<Task> getParents()

    - #### addChild

          public void addChild(Task parent)

    - #### getChildren

          public List<Task> getChildren()

    - #### getAntecessors

          public HashSet<Task> getAntecessors()

    - #### addAntecessors

          public void addAntecessors(HashSet<Task> newAntecessors)

    - #### addAntecessors

          public void addAntecessors(Task task)

    - #### getSuccessors

          public HashSet<Task> getSuccessors()

    - #### addSuccessors

          public void addSuccessors(HashSet<Task> newSuccessors)

    - #### addSuccessors

          public void addSuccessors(Task task)

    - #### addDataDependency

          public void addDataDependency(DataItem data)

    - #### getDataDependencies

          public List<DataItem> getDataDependencies()

    - #### getCloudlet

          public Cloudlet getCloudlet()

    - #### addOutput

          public void addOutput(DataItem data)

    - #### getOutput

          public List<DataItem> getOutput()

    - #### setVmId

          public void setVmId(int vmId)

    - #### getVmId

          public int getVmId()

    - #### isReady

          public boolean isReady()

    - #### hasReplicas

          public boolean hasReplicas()

    - #### addReplica

          public void addReplica(Task task)

    - #### getReplicas

          public List<Task> getReplicas()

    - #### hasFinished

          public void hasFinished()

      Communicates to the Task that its Cloudlet completed. It means that the dataItem is now available in the VM where it run.

    - #### isFinished

          public boolean isFinished()

    - #### getExecTime

          public double getExecTime()

    - #### isCritical

          public boolean isCritical()

    - #### setCritical

          public void setCritical(boolean critical)

    - #### getEarliestStart

          public double getEarliestStart()

    - #### setEarliestStart

          public void setEarliestStart(double earliestStart)

    - #### getLatestEnd

          public double getLatestEnd()

    - #### setLatestEnd

          public void setLatestEnd(double latestEnd)

    - #### getSlackTime

          public double getSlackTime()

    - #### setSlackTime

          public void setSlackTime(double slackTime)

    - #### getOptExecTime

          public double getOptExecTime()

    - #### setOptExecTime

          public void setOptExecTime(double optExecTime)

    - #### isDefined

          public boolean isDefined()

    - #### setDefined

          public void setDefined(boolean defined)

    - #### getRatioSlackExec

          public double getRatioSlackExec()

    - #### getOptIndexFreq

          public int getOptIndexFreq()

    - #### setOptIndexFreq

          public void setOptIndexFreq(int optIndexFreq)

    - #### getBasicExecTime

          public double getBasicExecTime()

Copyright © 2013 The Cloud Computing and Distributed Systems (CLOUDS) Laboratory, The University of Melbourne. All Rights Reserved.