public class DefaultResolvedRouteStore extends Object implements ResolvedRouteStore
| Constructor and Description |
|---|
DefaultResolvedRouteStore()
Creates a new resolved route store.
|
| Modifier and Type | Method and Description |
|---|---|
Collection<ResolvedRoute> |
getAllRoutes(org.onlab.packet.IpPrefix prefix)
Returns all resolved routes stored for the given prefix, including the
best selected route.
|
Optional<ResolvedRoute> |
getRoute(org.onlab.packet.IpPrefix prefix)
Returns the best selected route for the given IP prefix.
|
Collection<ResolvedRoute> |
getRoutes(RouteTableId table)
Returns the best routes for a give route table.
|
Set<RouteTableId> |
getRouteTables()
Gets the set of route tables.
|
Optional<ResolvedRoute> |
longestPrefixMatch(org.onlab.packet.IpAddress ip)
Performs a longest prefix match of the best routes on the given IP address.
|
RouteEvent |
removeRoute(org.onlab.packet.IpPrefix prefix)
Removes the best route for the given prefix.
|
RouteEvent |
updateRoute(ResolvedRoute route,
Set<ResolvedRoute> alternatives)
Adds or updates the best route for the given prefix.
|
public DefaultResolvedRouteStore()
public RouteEvent updateRoute(ResolvedRoute route, Set<ResolvedRoute> alternatives)
ResolvedRouteStoreupdateRoute in interface ResolvedRouteStoreroute - new best route for this prefixalternatives - alternative resolved routespublic RouteEvent removeRoute(org.onlab.packet.IpPrefix prefix)
ResolvedRouteStoreremoveRoute in interface ResolvedRouteStoreprefix - IP prefixpublic Set<RouteTableId> getRouteTables()
ResolvedRouteStoregetRouteTables in interface ResolvedRouteStorepublic Collection<ResolvedRoute> getRoutes(RouteTableId table)
ResolvedRouteStoregetRoutes in interface ResolvedRouteStoretable - route table IDpublic Optional<ResolvedRoute> getRoute(org.onlab.packet.IpPrefix prefix)
ResolvedRouteStoregetRoute in interface ResolvedRouteStoreprefix - IP prefixpublic Collection<ResolvedRoute> getAllRoutes(org.onlab.packet.IpPrefix prefix)
ResolvedRouteStoregetAllRoutes in interface ResolvedRouteStoreprefix - IP prefix to look up routes forpublic Optional<ResolvedRoute> longestPrefixMatch(org.onlab.packet.IpAddress ip)
ResolvedRouteStorelongestPrefixMatch in interface ResolvedRouteStoreip - IP address