Package org.onosproject.net.topology
Class DefaultTopologyCluster
- java.lang.Object
-
- org.onosproject.net.topology.DefaultTopologyCluster
-
- All Implemented Interfaces:
TopologyCluster
public class DefaultTopologyCluster extends java.lang.Object implements TopologyCluster
Default implementation of a network topology cluster.
-
-
Constructor Summary
Constructors Constructor Description DefaultTopologyCluster(ClusterId id, int deviceCount, int linkCount, TopologyVertex root)
Creates a new topology cluster descriptor with the specified attributes.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
deviceCount()
Returns the number of devices in the cluster.boolean
equals(java.lang.Object obj)
int
hashCode()
ClusterId
id()
Returns the cluster id.int
linkCount()
Returns the number of infrastructure links in the cluster.TopologyVertex
root()
Returns the cluster root vertex.java.lang.String
toString()
-
-
-
Constructor Detail
-
DefaultTopologyCluster
public DefaultTopologyCluster(ClusterId id, int deviceCount, int linkCount, TopologyVertex root)
Creates a new topology cluster descriptor with the specified attributes.- Parameters:
id
- cluster iddeviceCount
- number of devices in the clusterlinkCount
- number of links in the clusterroot
- cluster root node
-
-
Method Detail
-
id
public ClusterId id()
Description copied from interface:TopologyCluster
Returns the cluster id.- Specified by:
id
in interfaceTopologyCluster
- Returns:
- cluster identifier
-
deviceCount
public int deviceCount()
Description copied from interface:TopologyCluster
Returns the number of devices in the cluster.- Specified by:
deviceCount
in interfaceTopologyCluster
- Returns:
- number of cluster devices
-
linkCount
public int linkCount()
Description copied from interface:TopologyCluster
Returns the number of infrastructure links in the cluster.- Specified by:
linkCount
in interfaceTopologyCluster
- Returns:
- number of cluster links
-
root
public TopologyVertex root()
Description copied from interface:TopologyCluster
Returns the cluster root vertex.- Specified by:
root
in interfaceTopologyCluster
- Returns:
- cluster root vertex
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-