Package org.onosproject.net.topology
Class DefaultTopologyCluster
- java.lang.Object
-
- org.onosproject.net.topology.DefaultTopologyCluster
-
- All Implemented Interfaces:
TopologyCluster
public class DefaultTopologyCluster extends 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 intdeviceCount()Returns the number of devices in the cluster.booleanequals(Object obj)inthashCode()ClusterIdid()Returns the cluster id.intlinkCount()Returns the number of infrastructure links in the cluster.TopologyVertexroot()Returns the cluster root vertex.StringtoString()
-
-
-
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:TopologyClusterReturns the cluster id.- Specified by:
idin interfaceTopologyCluster- Returns:
- cluster identifier
-
deviceCount
public int deviceCount()
Description copied from interface:TopologyClusterReturns the number of devices in the cluster.- Specified by:
deviceCountin interfaceTopologyCluster- Returns:
- number of cluster devices
-
linkCount
public int linkCount()
Description copied from interface:TopologyClusterReturns the number of infrastructure links in the cluster.- Specified by:
linkCountin interfaceTopologyCluster- Returns:
- number of cluster links
-
root
public TopologyVertex root()
Description copied from interface:TopologyClusterReturns the cluster root vertex.- Specified by:
rootin interfaceTopologyCluster- Returns:
- cluster root vertex
-
-