Class AddPathAbstractRouteEntry

java.lang.Object
org.opendaylight.protocol.bgp.mode.impl.add.AddPathAbstractRouteEntry
All Implemented Interfaces:
RouteEntry

public abstract class AddPathAbstractRouteEntry extends Object implements 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 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: RouteEntry
      Put a route.
      Specified by:
      putRoute in interface RouteEntry
      Parameters:
      routerId - router ID in unsigned integer format from an Ipv4Address
      remotePathId - remote path Id received
      route - route Data change
      Returns:
      true if a new route was introduced, false if a route was replaced
    • removeRoute

      public final boolean removeRoute(RouterId routerId, org.opendaylight.yangtools.yang.common.Uint32 remotePathId)
      Description copied from interface: RouteEntry
      Remove a route.
      Specified by:
      removeRoute in interface RouteEntry
      Parameters:
      routerId - router ID in unsigned integer format from an Ipv4Address
      remotePathId - remote path Id received
      Returns:
      true if it was the last route on entry
    • removeStalePaths

      public final StaleBestPathRoute removeStalePaths(RIBSupport ribSupport, String routeKey)
      Description copied from interface: RouteEntry
      Returns list of stale best paths.
      Specified by:
      removeStalePaths in interface RouteEntry
      Parameters:
      ribSupport - RIB Support
      routeKey - of stale route
      Returns:
      list of stale best paths
    • newBestPaths

      public final List<AdvertizedRoute> newBestPaths(RIBSupport ribSupport, String routeKey)
      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 interface RouteEntry
      Parameters:
      ribSupport - RIB Support
      routeKey - 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: RouteEntry
      Returns collections of present selected best path.
      Specified by:
      actualBestPaths in interface RouteEntry
      Parameters:
      ribSupport - RIB Support
      entryInfo - Route Entry Info wrapper
      Returns:
      collections of present selected best path
    • selectBest

      public final boolean selectBest(RIBSupport ribSupport, long localAs)
      Description copied from interface: RouteEntry
      Indicates whether best has changed.
      Specified by:
      selectBest in interface RouteEntry
      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

      protected final void processOffset(RIBSupport ribSupport, AddPathSelector selector, int offset)
      Process a specific route offset into specified selector.
      Parameters:
      selector - selector to update
      offset - offset to process
    • bestPathAt

      protected final AddPathBestPath bestPathAt(RIBSupport ribSupport, int offset)