public class DefaultRouteTable extends java.lang.Object implements RouteTable
| Constructor and Description |
|---|
DefaultRouteTable(RouteTableId id,
RouteStoreDelegate delegate,
org.onosproject.store.service.StorageService storageService)
Creates a new route table.
|
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
Releases route table resources across the entire cluster.
|
java.util.Collection<RouteSet> |
getRoutes()
Returns all routes in the route table.
|
RouteSet |
getRoutes(org.onlab.packet.IpPrefix prefix)
Returns the routes in this table pertaining to a given prefix.
|
java.util.Collection<Route> |
getRoutesForNextHop(org.onlab.packet.IpAddress nextHop)
Returns all routes that have the given next hop.
|
RouteTableId |
id()
Returns the route table ID.
|
void |
remove(Route route)
Removes a route from the route table.
|
void |
shutdown()
Releases route table resources held locally.
|
void |
update(Route route)
Adds a route to the route table.
|
public DefaultRouteTable(RouteTableId id, RouteStoreDelegate delegate, org.onosproject.store.service.StorageService storageService)
id - route table IDdelegate - route store delegate to notify of eventsstorageService - storage servicepublic RouteTableId id()
RouteTableid in interface RouteTablepublic void shutdown()
RouteTableshutdown in interface RouteTablepublic void destroy()
RouteTabledestroy in interface RouteTablepublic void update(Route route)
RouteTableupdate in interface RouteTableroute - routepublic void remove(Route route)
RouteTableremove in interface RouteTableroute - routepublic java.util.Collection<RouteSet> getRoutes()
RouteTablegetRoutes in interface RouteTablepublic RouteSet getRoutes(org.onlab.packet.IpPrefix prefix)
RouteTablegetRoutes in interface RouteTableprefix - IP prefixpublic java.util.Collection<Route> getRoutesForNextHop(org.onlab.packet.IpAddress nextHop)
RouteTablegetRoutesForNextHop in interface RouteTablenextHop - next hop IP address