Class AddPathAbstractRouteEntry<C extends Routes & org.opendaylight.yangtools.binding.DataObject & org.opendaylight.yangtools.binding.ChoiceIn<Tables>,S extends org.opendaylight.yangtools.binding.ChildOf<? super C>>
java.lang.Object
org.opendaylight.protocol.bgp.mode.impl.add.AddPathAbstractRouteEntry<C,S>
- All Implemented Interfaces:
RouteEntry<C,S>
public abstract class AddPathAbstractRouteEntry<C extends Routes & org.opendaylight.yangtools.binding.DataObject & org.opendaylight.yangtools.binding.ChoiceIn<Tables>,S extends org.opendaylight.yangtools.binding.ChildOf<? super C>>
extends Object
implements RouteEntry<C,S>
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<C, S>> actualBestPaths(RIBSupport<C, S> ribSupport, RouteEntryInfo entryInfo) Returns collections of present selected best path.final intaddRoute(RouterId routerId, org.opendaylight.yangtools.yang.common.Uint32 remotePathId, org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode route) Add Route.protected final AddPathBestPathbestPathAt(RIBSupport<C, S> ribSupport, int offset) final List<AdvertizedRoute<C, S>> newBestPaths(RIBSupport<C, S> ribSupport, String routeKey) Returns collection of best path routes after processing update of stale and new advertisement of routes.protected final voidprocessOffset(RIBSupport<C, S> ribSupport, AddPathSelector selector, int offset) Process a specific route offset into specified selector.final booleanremoveRoute(RouterId routerId, org.opendaylight.yangtools.yang.common.Uint32 remotePathId) Remove route.final Optional<StaleBestPathRoute> removeStalePaths(RIBSupport<C, S> ribSupport, String routeKey) Returns list of stale best path.final booleanselectBest(RIBSupport<C, S> ribSupport, long localAs) Indicates whether best has changed.protected abstract com.google.common.collect.ImmutableList<AddPathBestPath> selectBest(RIBSupport<C, S> ribSupport, long localAs, int size)
-
Constructor Details
-
AddPathAbstractRouteEntry
public AddPathAbstractRouteEntry()
-
-
Method Details
-
addRoute
public final int addRoute(RouterId routerId, org.opendaylight.yangtools.yang.common.Uint32 remotePathId, org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode route) Description copied from interface:RouteEntryAdd Route.- Specified by:
addRoutein interfaceRouteEntry<C extends Routes & org.opendaylight.yangtools.binding.DataObject & org.opendaylight.yangtools.binding.ChoiceIn<Tables>,S extends org.opendaylight.yangtools.binding.ChildOf<? super C>> - Parameters:
routerId- router ID in unsigned integer format from an Ipv4AddressremotePathId- remote path Id receivedroute- route Data change- Returns:
- returns the offset
-
removeRoute
public final boolean removeRoute(RouterId routerId, org.opendaylight.yangtools.yang.common.Uint32 remotePathId) Description copied from interface:RouteEntryRemove route.- Specified by:
removeRoutein interfaceRouteEntry<C extends Routes & org.opendaylight.yangtools.binding.DataObject & org.opendaylight.yangtools.binding.ChoiceIn<Tables>,S extends org.opendaylight.yangtools.binding.ChildOf<? super C>> - Parameters:
routerId- router ID in unsigned integer format from an Ipv4AddressremotePathId- remote path Id received- Returns:
- return true if it was the last route on entry
-
removeStalePaths
public final Optional<StaleBestPathRoute> removeStalePaths(RIBSupport<C, S> ribSupport, String routeKey) Description copied from interface:RouteEntryReturns list of stale best path.- Specified by:
removeStalePathsin interfaceRouteEntry<C extends Routes & org.opendaylight.yangtools.binding.DataObject & org.opendaylight.yangtools.binding.ChoiceIn<Tables>,S extends org.opendaylight.yangtools.binding.ChildOf<? super C>> - Parameters:
ribSupport- RIB SupportrouteKey- of stale route- Returns:
- list containing list of stale best path
-
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<C extends Routes & org.opendaylight.yangtools.binding.DataObject & org.opendaylight.yangtools.binding.ChoiceIn<Tables>,S extends org.opendaylight.yangtools.binding.ChildOf<? super C>> - Parameters:
ribSupport- RIB SupportrouteKey- route key
-
actualBestPaths
public final List<ActualBestPathRoutes<C,S>> actualBestPaths(RIBSupport<C, S> ribSupport, RouteEntryInfo entryInfo) Description copied from interface:RouteEntryReturns collections of present selected best path.- Specified by:
actualBestPathsin interfaceRouteEntry<C extends Routes & org.opendaylight.yangtools.binding.DataObject & org.opendaylight.yangtools.binding.ChoiceIn<Tables>,S extends org.opendaylight.yangtools.binding.ChildOf<? super C>> - Parameters:
ribSupport- RIB SupportentryInfo- Route Entry Info wrapper
-
selectBest
Description copied from interface:RouteEntryIndicates whether best has changed.- Specified by:
selectBestin interfaceRouteEntry<C extends Routes & org.opendaylight.yangtools.binding.DataObject & org.opendaylight.yangtools.binding.ChoiceIn<Tables>,S extends org.opendaylight.yangtools.binding.ChildOf<? super C>> - 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<C, S> ribSupport, long localAs, int size) -
processOffset
protected final void processOffset(RIBSupport<C, S> ribSupport, AddPathSelector selector, int offset) Process a specific route offset into specified selector.- Parameters:
selector- selector to updateoffset- offset to process
-
bestPathAt
-