public class Edge extends Object
Modifier and Type | Field and Description |
---|---|
boolean |
complete |
long |
compTime |
(package private) long |
cost |
static long |
DEFAULT_BPS |
static long |
DEFAULT_LATENCY |
static long |
DEFAULT_SIZE |
boolean |
deleted |
(package private) String |
fileName |
(package private) long |
fileSize |
(package private) Node |
fromNode |
(package private) Node |
toNode |
Constructor and Description |
---|
Edge(Node from,
Node to,
String fileName,
long fileSize)
Constructor
|
Modifier and Type | Method and Description |
---|---|
long |
getCost() |
long |
getCost(long bandwidth,
long latency) |
Node |
getFrom()
return the 'from' task
|
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
|
public static final long DEFAULT_SIZE
public static final long DEFAULT_BPS
public static final long DEFAULT_LATENCY
Node fromNode
Node toNode
long cost
String fileName
long fileSize
public boolean complete
public long compTime
public boolean deleted
public Edge(Node from, Node to, String fileName, long fileSize)
from
- One of nodes this edge connects which generate the datato
- Another node this edge connects which get the datafileName
- the stored name of datafileSize
- the size of the data, DTT is calculated according to BPS and Latencypublic void init()
public Node getFrom()
public Node getTo()
public void setFrom(Node e)
e
- the from task to be setpublic void setTo(Node e)
e
- the to task to be setpublic String getID()
public long getCost(long bandwidth, long latency)
public long getCost()
public void setCost(long c)
public void print()