Package org.onosproject.net.topology
Class MetricLinkWeight
- java.lang.Object
-
- org.onosproject.net.topology.MetricLinkWeight
-
- All Implemented Interfaces:
EdgeWeigher<TopologyVertex,TopologyEdge>
,LinkWeigher
public class MetricLinkWeight extends java.lang.Object implements LinkWeigher
Link weight for measuring link cost using the link metric annotation.
-
-
Constructor Summary
Constructors Constructor Description MetricLinkWeight()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Weight
getInitialWeight()
Returns initial weight value (i.e.Weight
getNonViableWeight()
Returns weight of a link/path that should be skipped (can be considered as an infinite weight).Weight
weight(TopologyEdge edge)
Returns the weight of the given edge.
-
-
-
Method Detail
-
getInitialWeight
public Weight getInitialWeight()
Description copied from interface:EdgeWeigher
Returns initial weight value (i.e. weight of a "path" starting and terminating in the same vertex; typically 0 value is used).- Specified by:
getInitialWeight
in interfaceEdgeWeigher<TopologyVertex,TopologyEdge>
- Returns:
- null path weight
-
getNonViableWeight
public Weight getNonViableWeight()
Description copied from interface:EdgeWeigher
Returns weight of a link/path that should be skipped (can be considered as an infinite weight).- Specified by:
getNonViableWeight
in interfaceEdgeWeigher<TopologyVertex,TopologyEdge>
- Returns:
- non viable weight
-
weight
public Weight weight(TopologyEdge edge)
Description copied from interface:EdgeWeigher
Returns the weight of the given edge.- Specified by:
weight
in interfaceEdgeWeigher<TopologyVertex,TopologyEdge>
- Parameters:
edge
- edge to be weighed- Returns:
- edge weight
-
-