- private void fillAdjRibsOut(final boolean isFirstBestPath, final ContainerNode attributes,
- final MapEntryNode defaultValue, final MapEntryNode addPathValue,
- final PathArgument routeIdAddPathDefault,
- final PathArgument routeIdAddPath, final PeerId routePeerId, final ExportPolicyPeerTracker peerPT,
- final TablesKey localTK, final RIBSupport ribSup, final DOMDataWriteTransaction tx) {
- /*
- * We need to keep track of routers and populate adj-ribs-out, too. If we do not, we need to
- * expose from which client a particular route was learned from in the local RIB, and have
- * the listener perform filtering.
- *
- * We walk the policy set in order to minimize the amount of work we do for multiple peers:
- * if we have two eBGP peers, for example, there is no reason why we should perform the translation
- * multiple times.
- */
- for (final PeerRole role : PeerRole.values()) {
- final PeerExportGroup peerGroup = peerPT.getPeerGroup(role);
- if (peerGroup != null) {
- final ContainerNode effectiveAttributes = peerGroup.effectiveAttributes(getRoutePeerIdRole(peerPT,
- routePeerId), attributes);
- peerGroup.forEach((destPeer, rootPath) -> {
- final boolean destPeerSupAddPath = peerPT.isAddPathSupportedByPeer(destPeer);
- if (filterRoutes(routePeerId, destPeer, peerPT, localTK, role)
- && peersSupportsAddPathOrIsFirstBestPath(destPeerSupAddPath, isFirstBestPath)) {
- if (destPeerSupAddPath) {
- update(destPeer, getAdjRibOutYII(ribSup, rootPath, routeIdAddPath, localTK),
- effectiveAttributes, addPathValue, ribSup, tx);
- } else if (!this.oldNonAddPathBestPathTheSame) {
- update(destPeer, getAdjRibOutYII(ribSup, rootPath, routeIdAddPathDefault, localTK),
- effectiveAttributes, defaultValue, ribSup, tx);
- }
- }
- });
- }
+ @Override
+ public final List<ActualBestPathRoutes<C, S, R, I>> actualBestPaths(final RIBSupport<C, S, R, I> ribSupport,
+ final RouteEntryInfo entryInfo) {
+ if (this.bestPath == null || this.bestPath.isEmpty()) {
+ return Collections.emptyList();