@Service public class RouteStoreImpl extends org.onosproject.store.AbstractStore<InternalRouteEvent,RouteStoreDelegate> implements RouteStore
| Modifier and Type | Field and Description |
|---|---|
protected org.onosproject.cfg.ComponentConfigService |
componentConfigService |
org.onosproject.store.service.StorageService |
storageService |
| Constructor and Description |
|---|
RouteStoreImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
activate(org.osgi.service.component.ComponentContext context) |
void |
deactivate() |
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 |
modified(org.osgi.service.component.ComponentContext context) |
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 |
setDelegate(RouteStoreDelegate delegate) |
void |
unsetDelegate(RouteStoreDelegate delegate) |
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@Reference(cardinality=MANDATORY_UNARY) protected org.onosproject.cfg.ComponentConfigService componentConfigService
@Reference(cardinality=MANDATORY_UNARY) public org.onosproject.store.service.StorageService storageService
public void activate(org.osgi.service.component.ComponentContext context)
@Deactivate public void deactivate()
@Modified public void modified(org.osgi.service.component.ComponentContext context)
public void setDelegate(RouteStoreDelegate delegate)
setDelegate in interface org.onosproject.store.Store<InternalRouteEvent,RouteStoreDelegate>setDelegate in class org.onosproject.store.AbstractStore<InternalRouteEvent,RouteStoreDelegate>public void unsetDelegate(RouteStoreDelegate delegate)
unsetDelegate in interface org.onosproject.store.Store<InternalRouteEvent,RouteStoreDelegate>unsetDelegate in class org.onosproject.store.AbstractStore<InternalRouteEvent,RouteStoreDelegate>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