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>>

  • 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 Detail

      • AddPathAbstractRouteEntry

        public AddPathAbstractRouteEntry()
    • 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: RouteEntry
        Add Route.
        Specified by:
        addRoute in interface RouteEntry<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 Ipv4Address
        remotePathId - remote path Id received
        route - 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 interface RouteEntry<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 Ipv4Address
        remotePathId - 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 interface RouteEntry<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 Support
        routeKey - 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: RouteEntry
        Returns collection of best path routes after processing update of stale and new advertisement of routes.
        Specified by:
        newBestPaths in interface RouteEntry<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 Support
        routeKey - 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 interface RouteEntry<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 Support
        entryInfo - Route Entry Info wrapper
      • selectBest

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