public class LocalRouteStore extends org.onosproject.store.AbstractStore<InternalRouteEvent,RouteStoreDelegate> implements RouteStore
| Constructor and Description |
|---|
LocalRouteStore() |
| Modifier and Type | Method and Description |
|---|---|
void |
activate()
Sets up local route store.
|
void |
deactivate()
Cleans up local route store.
|
NextHopData |
getNextHop(org.onlab.packet.IpAddress ip)
Returns the information of the given next hop.
|
Map<org.onlab.packet.IpAddress,NextHopData> |
getNextHops()
Returns all next hops in the route store.
|
RouteSet |
getRoutes(org.onlab.packet.IpPrefix prefix)
Returns the set of routes in the default route table for the given prefix.
|
Collection<RouteSet> |
getRoutes(RouteTableId table)
Returns the routes in the given route table, grouped by prefix.
|
Collection<Route> |
getRoutesForNextHop(org.onlab.packet.IpAddress ip)
Returns the routes that point to the given next hop IP address.
|
Set<RouteTableId> |
getRouteTables()
Returns the IDs for all route tables in the store.
|
Route |
longestPrefixMatch(org.onlab.packet.IpAddress ip)
Performs a longest prefix match with the given IP address.
|
void |
removeNextHop(org.onlab.packet.IpAddress ip,
NextHopData nextHopData)
Removes a next hop information from the store.
|
void |
removeRoute(Route route)
Removes the given route from the store.
|
void |
updateNextHop(org.onlab.packet.IpAddress ip,
NextHopData nextHopData)
Updates a next hop information in the store.
|
void |
updateRoute(Route route)
Adds or updates the given route in the store.
|
hasDelegate, notifyDelegate, notifyDelegate, setDelegate, unsetDelegatepublic void activate()
public void deactivate()
public void updateRoute(Route route)
RouteStoreupdateRoute in interface RouteStoreroute - route to add or updatepublic void removeRoute(Route route)
RouteStoreremoveRoute in interface RouteStoreroute - route to removepublic Set<RouteTableId> getRouteTables()
RouteStoregetRouteTables in interface RouteStorepublic Collection<RouteSet> getRoutes(RouteTableId table)
RouteStoregetRoutes in interface RouteStoretable - route table IDpublic Route longestPrefixMatch(org.onlab.packet.IpAddress ip)
RouteStorelongestPrefixMatch in interface RouteStoreip - IP to look uppublic Collection<Route> getRoutesForNextHop(org.onlab.packet.IpAddress ip)
RouteStoregetRoutesForNextHop in interface RouteStoreip - IP address of the next hoppublic RouteSet getRoutes(org.onlab.packet.IpPrefix prefix)
RouteStoregetRoutes in interface RouteStoreprefix - IP prefixpublic void updateNextHop(org.onlab.packet.IpAddress ip,
NextHopData nextHopData)
RouteStoreupdateNextHop in interface RouteStoreip - IP addressnextHopData - Information of the next hoppublic void removeNextHop(org.onlab.packet.IpAddress ip,
NextHopData nextHopData)
RouteStoreremoveNextHop in interface RouteStoreip - IP addressnextHopData - Information of the next hoppublic NextHopData getNextHop(org.onlab.packet.IpAddress ip)
RouteStoregetNextHop in interface RouteStoreip - next hop IPpublic Map<org.onlab.packet.IpAddress,NextHopData> getNextHops()
RouteStoregetNextHops in interface RouteStore