net.floodlightcontroller.routing
Class Route
java.lang.Object
net.floodlightcontroller.routing.Route
- All Implemented Interfaces:
- java.lang.Comparable<Route>
public class Route
- extends java.lang.Object
- implements java.lang.Comparable<Route>
Represents a route between two switches
- Author:
- David Erickson (daviderickson@cs.stanford.edu)
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
id
protected RouteId id
switchPorts
protected java.util.List<NodePortTuple> switchPorts
routeCount
protected int routeCount
Route
public Route(RouteId id,
java.util.List<NodePortTuple> switchPorts)
Route
public Route(java.lang.Long src,
java.lang.Long dst)
getId
public RouteId getId()
- Returns:
- the id
setId
public void setId(RouteId id)
- Parameters:
id
- the id to set
getPath
public java.util.List<NodePortTuple> getPath()
- Returns:
- the path
setPath
public void setPath(java.util.List<NodePortTuple> switchPorts)
- Parameters:
path
- the path to set
setRouteCount
public void setRouteCount(int routeCount)
- Parameters:
routeCount
- routeCount set by (ECMP) buildRoute method
getRouteCount
public int getRouteCount()
- Returns:
- routeCount return routeCount set by (ECMP) buildRoute method
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
compareTo
public int compareTo(Route o)
- Compares the path lengths between Routes.
- Specified by:
compareTo
in interface java.lang.Comparable<Route>