T1 - PortT2 - Switchpublic abstract class Link<T1 extends Port,T2 extends Switch> extends Object implements Persistable
| Modifier and Type | Field and Description |
|---|---|
static String |
DB_KEY
Database keyword for links.
|
protected T1 |
dstPort |
protected T1 |
srcPort |
| Modifier | Constructor and Description |
|---|---|
protected |
Link(T1 srcPort,
T1 dstPort)
Instantiates a new link.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
Map<String,Object> |
getDBIndex() |
String |
getDBKey() |
String |
getDBName() |
Map<String,Object> |
getDBObject() |
T1 |
getDstPort()
Gets the destination port instance.
|
T2 |
getDstSwitch()
Gets the destination switch of the link.
|
Integer |
getMetric()
Compute the link metric based on the link nominal throughput, like OSPF
Formula is => metric = refBandwidth / linkThroughput, where refBandwidth
is 100Gbps.
|
T1 |
getSrcPort()
Gets the source port instance.
|
T2 |
getSrcSwitch()
Gets the source switch of the link.
|
int |
hashCode() |
String |
toString() |
abstract void |
unregister()
Removes mappings and dependencies related to this link.
|
public static final String DB_KEY
public T1 getSrcPort()
public T1 getDstPort()
public T2 getSrcSwitch()
public T2 getDstSwitch()
public abstract void unregister()
public Integer getMetric()
public Map<String,Object> getDBIndex()
getDBIndex in interface Persistablepublic String getDBKey()
getDBKey in interface Persistablepublic String getDBName()
getDBName in interface Persistablepublic Map<String,Object> getDBObject()
getDBObject in interface PersistableCopyright © 2015. All rights reserved.