Class AddPathAbstractRouteEntry<C extends Routes & org.opendaylight.yangtools.yang.binding.DataObject & org.opendaylight.yangtools.yang.binding.ChoiceIn<Tables>,S extends org.opendaylight.yangtools.yang.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.yang.binding.DataObject & org.opendaylight.yangtools.yang.binding.ChoiceIn<Tables>,S extends org.opendaylight.yangtools.yang.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
-
Method Summary
Modifier and TypeMethodDescriptionfinal List<ActualBestPathRoutes<C,
S>> actualBestPaths
(RIBSupport<C, S> ribSupport, RouteEntryInfo entryInfo) Returns collections of present selected best path.final int
addRoute
(RouterId routerId, org.opendaylight.yangtools.yang.common.Uint32 remotePathId, org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode route) Add Route.protected final AddPathBestPath
bestPathAt
(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 void
processOffset
(RIBSupport<C, S> ribSupport, AddPathSelector selector, int offset) Process a specific route offset into specified selector.final boolean
removeRoute
(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 boolean
selectBest
(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:RouteEntry
Add Route.- Specified by:
addRoute
in interfaceRouteEntry<C extends Routes & org.opendaylight.yangtools.yang.binding.DataObject & org.opendaylight.yangtools.yang.binding.ChoiceIn<Tables>,
S extends org.opendaylight.yangtools.yang.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:RouteEntry
Remove route.- Specified by:
removeRoute
in interfaceRouteEntry<C extends Routes & org.opendaylight.yangtools.yang.binding.DataObject & org.opendaylight.yangtools.yang.binding.ChoiceIn<Tables>,
S extends org.opendaylight.yangtools.yang.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:RouteEntry
Returns list of stale best path.- Specified by:
removeStalePaths
in interfaceRouteEntry<C extends Routes & org.opendaylight.yangtools.yang.binding.DataObject & org.opendaylight.yangtools.yang.binding.ChoiceIn<Tables>,
S extends org.opendaylight.yangtools.yang.binding.ChildOf<? super C>> - Parameters:
ribSupport
- RIB SupportrouteKey
- of stale route- Returns:
- list containing list of stale best path
-
newBestPaths
Description copied from interface:RouteEntry
Returns collection of best path routes after processing update of stale and new advertisement of routes.- Specified by:
newBestPaths
in interfaceRouteEntry<C extends Routes & org.opendaylight.yangtools.yang.binding.DataObject & org.opendaylight.yangtools.yang.binding.ChoiceIn<Tables>,
S extends org.opendaylight.yangtools.yang.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:RouteEntry
Returns collections of present selected best path.- Specified by:
actualBestPaths
in interfaceRouteEntry<C extends Routes & org.opendaylight.yangtools.yang.binding.DataObject & org.opendaylight.yangtools.yang.binding.ChoiceIn<Tables>,
S extends org.opendaylight.yangtools.yang.binding.ChildOf<? super C>> - Parameters:
ribSupport
- RIB SupportentryInfo
- Route Entry Info wrapper
-
selectBest
Description copied from interface:RouteEntry
Indicates whether best has changed.- Specified by:
selectBest
in interfaceRouteEntry<C extends Routes & org.opendaylight.yangtools.yang.binding.DataObject & org.opendaylight.yangtools.yang.binding.ChoiceIn<Tables>,
S extends org.opendaylight.yangtools.yang.binding.ChildOf<? super C>> 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
-