Interface RouteEntry
- All Superinterfaces:
org.opendaylight.yangtools.concepts.Mutable
@NonNullByDefault
public interface RouteEntry
extends org.opendaylight.yangtools.concepts.Mutable
A single route entry, identified by a
route key, inside a route table, supported by a RIBSupport.
Maintains the attributes of from all contributing peers. The information is stored in arrays with a shared map
of offsets for peers to allow lookups. This is needed to maintain low memory overhead in face of large number
of routes and peers, where individual object overhead becomes the dominating factor.
RouteEntry objects are inherently mutable with no inter-thread synchronization guarantees. The intended
contract is that a controller can either:
- query current best paths via
actualBestPaths(RIBSupport, String) - update current best paths by invoking a series of
putRoute(RouterId, Uint32, MapEntryNode)andremoveRoute(RouterId, Uint32)operations followed by a call toselectBest(RIBSupport, long, String)
-
Method Summary
Modifier and TypeMethodDescriptionactualBestPaths(RIBSupport ribSupport, String routeKey) Returns collections of present selected best path.booleanputRoute(RouterId routerId, org.opendaylight.yangtools.yang.common.Uint32 remotePathId, org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode route) Put a route.booleanremoveRoute(RouterId routerId, org.opendaylight.yangtools.yang.common.Uint32 remotePathId) Remove a route.@Nullable BestPathUpdateselectBest(RIBSupport ribSupport, long localAs, String routeKey) Run best path selection and indicate its impact on propagation of this entry.
-
Method Details
-
putRoute
boolean putRoute(RouterId routerId, org.opendaylight.yangtools.yang.common.Uint32 remotePathId, org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode route) Put a route.- Parameters:
routerId- router ID in unsigned integer format from an Ipv4AddressremotePathId- remote path Id receivedroute- route Data change- Returns:
trueif a new route was introduced,falseif a route was replaced
-
removeRoute
Remove a route.- Parameters:
routerId- router ID in unsigned integer format from an Ipv4AddressremotePathId- remote path Id received- Returns:
trueif it was the last route on entry
-
selectBest
@CheckReturnValue @Nullable BestPathUpdate selectBest(RIBSupport ribSupport, long localAs, String routeKey) Run best path selection and indicate its impact on propagation of this entry.- Parameters:
ribSupport- RIB SupportlocalAs- The local autonomous system numberrouteKey- route key- Returns:
- an
BestPathUpdateif selection results in a change in how this entry should be adverized
-
actualBestPaths
@CheckReturnValue List<ActualBestPathRoutes> actualBestPaths(RIBSupport ribSupport, String routeKey) Returns collections of present selected best path.- Parameters:
ribSupport- RIB SupportrouteKey- route key- Returns:
- collections of present selected best path
-