net.floodlightcontroller.routing
Class Route

java.lang.Object
  extended by 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)

Field Summary
protected  RouteId id
           
protected  int routeCount
           
protected  java.util.List<NodePortTuple> switchPorts
           
 
Constructor Summary
Route(java.lang.Long src, java.lang.Long dst)
           
Route(RouteId id, java.util.List<NodePortTuple> switchPorts)
           
 
Method Summary
 int compareTo(Route o)
          Compares the path lengths between Routes.
 boolean equals(java.lang.Object obj)
           
 RouteId getId()
           
 java.util.List<NodePortTuple> getPath()
           
 int getRouteCount()
           
 int hashCode()
           
 void setId(RouteId id)
           
 void setPath(java.util.List<NodePortTuple> switchPorts)
           
 void setRouteCount(int routeCount)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

id

protected RouteId id

switchPorts

protected java.util.List<NodePortTuple> switchPorts

routeCount

protected int routeCount
Constructor Detail

Route

public Route(RouteId id,
             java.util.List<NodePortTuple> switchPorts)

Route

public Route(java.lang.Long src,
             java.lang.Long dst)
Method Detail

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>