Class Edge


  • public class Edge
    extends java.lang.Object
    An instance of this class represent an edge of workflow which is data dependencies between two tasks. So this class contains references of two dependent nodes(From node and To node) and information of data between them; file name, data size and data transfer time.
    Author:
    Eunkyu Byun
    • Constructor Summary

      Constructors 
      Constructor Description
      Edge​(Node from, Node to, java.lang.String fileName, long fileSize)
      Constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long getCost()  
      long getCost​(long bandwidth, long latency)  
      Node getFrom()
      return the 'from' task
      java.lang.String getID()  
      Node getTo()
      return the 'to' task
      void init()
      initiate bit and completion time variable used bt HEFT algorithm
      void print()  
      void setCost​(long c)  
      void setFrom​(Node e)
      set the 'from' task
      void setTo​(Node e)
      set the 'to' task
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • fromNode

        Node fromNode
      • toNode

        Node toNode
      • cost

        long cost
      • fileName

        java.lang.String fileName
      • fileSize

        long fileSize
      • complete

        public boolean complete
      • compTime

        public long compTime
      • deleted

        public boolean deleted
    • Constructor Detail

      • Edge

        public Edge​(Node from,
                    Node to,
                    java.lang.String fileName,
                    long fileSize)
        Constructor
        Parameters:
        from - One of nodes this edge connects which generate the data
        to - Another node this edge connects which get the data
        fileName - the stored name of data
        fileSize - the size of the data, DTT is calculated according to BPS and Latency
    • Method Detail

      • init

        public void init()
        initiate bit and completion time variable used bt HEFT algorithm
      • getFrom

        public Node getFrom()
        return the 'from' task
      • getTo

        public Node getTo()
        return the 'to' task
      • setFrom

        public void setFrom​(Node e)
        set the 'from' task
        Parameters:
        e - the from task to be set
      • setTo

        public void setTo​(Node e)
        set the 'to' task
        Parameters:
        e - the to task to be set
      • getID

        public java.lang.String getID()
      • getCost

        public long getCost​(long bandwidth,
                            long latency)
      • getCost

        public long getCost()
      • setCost

        public void setCost​(long c)
      • print

        public void print()