public class BroadcastTree extends Object implements TopologyTree
| Constructor and Description |
|---|
BroadcastTree() |
BroadcastTree(HashMap<DataPathId,Link> nexthoplinks,
HashMap<DataPathId,Integer> cost)
Creates a Tree representing all next hop links and cost.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addTreeLink(DataPathId myNode,
Link link)
Adds a node and associated Link to the tree.
|
int |
getCost(DataPathId dataPathId)
Provides cost associated a node in the tree.
|
HashMap<DataPathId,Integer> |
getCosts()
Provides All nodes and associated cost in the tree.
|
HashMap<DataPathId,Link> |
getLinks()
Provides All nodes and associated Links in the tree.
|
Link |
getTreeLink(DataPathId node)
Gives the Link associated to given node in the tree.
|
String |
toDebugString()
Detailed insight into the current tree.
|
String |
toString() |
public BroadcastTree()
public BroadcastTree(HashMap<DataPathId,Link> nexthoplinks, HashMap<DataPathId,Integer> cost)
nexthoplinks - Map of next hop nodes and associated linkcost - Map of nodes and associated costpublic Link getTreeLink(DataPathId node)
getTreeLink in interface TopologyTreenode - Id of the device in the Treepublic int getCost(DataPathId dataPathId)
getCost in interface TopologyTreedataPathId - Id of the devicepublic HashMap<DataPathId,Link> getLinks()
getLinks in interface TopologyTreepublic void addTreeLink(DataPathId myNode, Link link)
myNode - Id of the device to be added to treelink - Link associated to the new node to be addedpublic String toDebugString()
public HashMap<DataPathId,Integer> getCosts()
getCosts in interface TopologyTreeCopyright © 2014. All Rights Reserved.