public class TopologyClusterDTO extends Object implements TopologyCluster
| Modifier and Type | Field and Description |
|---|---|
protected long |
id
Cluster id derived as lowest id of nodes in the cluster.
|
protected Map<DataPathId,Set<Link>> |
links
Map of nodes and associated links of the cluster.
|
protected DataPathId |
root
DataPathId of the root device in the cluster.
|
| Constructor and Description |
|---|
TopologyClusterDTO()
Creates L2 cluster with empty links.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(DataPathId n)
Adds the device to cluster.
|
void |
addLink(Link l)
Adds the link to cluster.
|
boolean |
equals(Object obj)
Equality based on just the cluster ID and not the members.
|
static long |
generateId(DataPathId n)
Generates the long value for given datapath id.
|
int |
hashCode() |
long |
id()
Retrieves the unique id of this cluster.
|
Map<DataPathId,Set<Link>> |
links()
Retrieves the map of device dpid and the set of links associated
to that dpid.
|
Set<DataPathId> |
nodes()
Retrieves the set of devicepath ids of the devices comprising this
cluster.
|
DataPathId |
root()
Returns the cluster root datapath id.
|
void |
setId(long id)
Sets the id to cluster.
|
void |
setLinks(Map<DataPathId,Set<Link>> links) |
void |
setRoot(DataPathId root)
Sets the root to cluster
|
String |
toString() |
protected long id
protected Map<DataPathId,Set<Link>> links
protected DataPathId root
public TopologyClusterDTO()
public long id()
TopologyClusterid in interface TopologyClusterpublic void setId(long id)
id - cluster id to be setpublic Map<DataPathId,Set<Link>> links()
TopologyClusterlinks in interface TopologyClusterpublic DataPathId root()
root in interface TopologyClusterpublic void setRoot(DataPathId root)
root - cluster root to be setpublic void add(DataPathId n)
n - Id of the device to be addedpublic static long generateId(DataPathId n)
n - datapath idpublic Set<DataPathId> nodes()
TopologyClusternodes in interface TopologyClusterpublic void addLink(Link l)
l - Link to be addedpublic boolean equals(Object obj)
public void setLinks(Map<DataPathId,Set<Link>> links)
links - the links to setCopyright © 2014. All Rights Reserved.