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
Constructors Constructor Description AddPathAbstractRouteEntry()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description List<ActualBestPathRoutes<C,S>>actualBestPaths(RIBSupport<C,S> ribSupport, RouteEntryInfo entryInfo)Returns collections of present selected best path.intaddRoute(RouterId routerId, org.opendaylight.yangtools.yang.common.Uint32 remotePathId, org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode route)Add Route.protected AddPathBestPathbestPathAt(RIBSupport<C,S> ribSupport, int offset)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 voidprocessOffset(RIBSupport<C,S> ribSupport, AddPathSelector selector, int offset)Process a specific route offset into specified selector.booleanremoveRoute(RouterId routerId, org.opendaylight.yangtools.yang.common.Uint32 remotePathId)Remove route.Optional<StaleBestPathRoute>removeStalePaths(RIBSupport<C,S> ribSupport, String routeKey)Returns list of stale best path.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)
-
-
-
Method Detail
-
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.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:RouteEntryRemove route.- Specified by:
removeRoutein 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:RouteEntryReturns list of stale best path.- Specified by:
removeStalePathsin 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
public final List<AdvertizedRoute<C,S>> newBestPaths(RIBSupport<C,S> ribSupport, String routeKey)
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.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:RouteEntryReturns collections of present selected best path.- Specified by:
actualBestPathsin 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
public final boolean selectBest(RIBSupport<C,S> ribSupport, long localAs)
Description copied from interface:RouteEntryIndicates whether best has changed.- Specified by:
selectBestin 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
protected final AddPathBestPath bestPathAt(RIBSupport<C,S> ribSupport, int offset)
-
-