Class AddPathAbstractRouteEntry
java.lang.Object
org.opendaylight.protocol.bgp.mode.impl.add.AddPathAbstractRouteEntry
- All Implemented Interfaces:
RouteEntry
A single route entry inside a route table. Maintains the attributes 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.
This class is NOT thread-safe.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal List<ActualBestPathRoutes> actualBestPaths(RIBSupport ribSupport, RouteEntryInfo entryInfo) Returns collections of present selected best path.protected final AddPathBestPathbestPathAt(RIBSupport ribSupport, int offset) final List<AdvertizedRoute> newBestPaths(RIBSupport ribSupport, String routeKey) Returns collection of best path routes after processing update of stale and new advertisement of routes.protected final voidprocessOffset(RIBSupport ribSupport, AddPathSelector selector, int offset) Process a specific route offset into specified selector.final booleanputRoute(RouterId routerId, org.opendaylight.yangtools.yang.common.Uint32 remotePathId, org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode route) Put a route.final booleanremoveRoute(RouterId routerId, org.opendaylight.yangtools.yang.common.Uint32 remotePathId) Remove a route.final StaleBestPathRouteremoveStalePaths(RIBSupport ribSupport, String routeKey) Returns list of stale best paths.final booleanselectBest(RIBSupport ribSupport, long localAs) Indicates whether best has changed.protected abstract com.google.common.collect.ImmutableList<AddPathBestPath> selectBest(RIBSupport ribSupport, long localAs, int size)
-
Constructor Details
-
AddPathAbstractRouteEntry
public AddPathAbstractRouteEntry()
-
-
Method Details
-
putRoute
public final boolean putRoute(RouterId routerId, org.opendaylight.yangtools.yang.common.Uint32 remotePathId, org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode route) Description copied from interface:RouteEntryPut a route.- Specified by:
putRoutein interfaceRouteEntry- 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
public final boolean removeRoute(RouterId routerId, org.opendaylight.yangtools.yang.common.Uint32 remotePathId) Description copied from interface:RouteEntryRemove a route.- Specified by:
removeRoutein interfaceRouteEntry- Parameters:
routerId- router ID in unsigned integer format from an Ipv4AddressremotePathId- remote path Id received- Returns:
trueif it was the last route on entry
-
removeStalePaths
Description copied from interface:RouteEntryReturns list of stale best paths.- Specified by:
removeStalePathsin interfaceRouteEntry- Parameters:
ribSupport- RIB SupportrouteKey- of stale route- Returns:
- list of stale best paths
-
newBestPaths
Description copied from interface:RouteEntryReturns collection of best path routes after processing update of stale and new advertisement of routes.- Specified by:
newBestPathsin interfaceRouteEntry- Parameters:
ribSupport- RIB SupportrouteKey- route key- Returns:
- collection of best path routes after processing update of stale and new advertisement of routes
-
actualBestPaths
public final List<ActualBestPathRoutes> actualBestPaths(RIBSupport ribSupport, RouteEntryInfo entryInfo) Description copied from interface:RouteEntryReturns collections of present selected best path.- Specified by:
actualBestPathsin interfaceRouteEntry- Parameters:
ribSupport- RIB SupportentryInfo- Route Entry Info wrapper- Returns:
- collections of present selected best path
-
selectBest
Description copied from interface:RouteEntryIndicates whether best has changed.- Specified by:
selectBestin interfaceRouteEntry- Parameters:
localAs- The local autonomous system number- Returns:
- return true if it has changed
-
selectBest
protected abstract com.google.common.collect.ImmutableList<AddPathBestPath> selectBest(RIBSupport ribSupport, long localAs, int size) -
processOffset
Process a specific route offset into specified selector.- Parameters:
selector- selector to updateoffset- offset to process
-
bestPathAt
-