X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=bgp%2Frib-impl%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fprotocol%2Fbgp%2Frib%2Fimpl%2FAbstractPeer.java;h=4d0eb7b8105115971396e7ff9accd63eab89368b;hb=43c2aef773499f76117898c0ce2403c8826449fa;hp=f79b95f21ccd479649043fc0f6b9daf741d02bcd;hpb=f703ba6202e33c0bd07a099f8fda2f152b14d1a9;p=bgpcep.git diff --git a/bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/AbstractPeer.java b/bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/AbstractPeer.java index f79b95f21c..4d0eb7b810 100644 --- a/bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/AbstractPeer.java +++ b/bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/AbstractPeer.java @@ -11,7 +11,9 @@ import com.google.common.util.concurrent.FluentFuture; import com.google.common.util.concurrent.FutureCallback; import com.google.common.util.concurrent.MoreExecutors; import java.util.Arrays; +import java.util.Collections; import java.util.List; +import java.util.Map; import java.util.Optional; import java.util.Set; import java.util.concurrent.ExecutionException; @@ -92,8 +94,10 @@ abstract class AbstractPeer extends BGPPeerStateImpl implements BGPRouteEntryImp @Nullable final AsNumber localAs, final IpAddress neighborAddress, final Set afiSafisAdvertized, - final Set afiSafisGracefulAdvertized) { - super(rib.getInstanceIdentifier(), groupId, neighborAddress, afiSafisAdvertized, afiSafisGracefulAdvertized); + final Set afiSafisGracefulAdvertized, + final Map afiSafisLlGracefulAdvertized) { + super(rib.getInstanceIdentifier(), groupId, neighborAddress, afiSafisAdvertized, afiSafisGracefulAdvertized, + afiSafisLlGracefulAdvertized); this.name = peerName; this.peerRole = role; this.clusterId = clusterId; @@ -110,7 +114,7 @@ abstract class AbstractPeer extends BGPPeerStateImpl implements BGPRouteEntryImp final IpAddress neighborAddress, final Set afiSafisGracefulAdvertized) { this(rib, peerName, groupId, role, null, null, neighborAddress, - rib.getLocalTablesKeys(), afiSafisGracefulAdvertized); + rib.getLocalTablesKeys(), afiSafisGracefulAdvertized, Collections.emptyMap()); } final synchronized FluentFuture removePeer(@Nullable final YangInstanceIdentifier peerPath) { @@ -141,7 +145,7 @@ abstract class AbstractPeer extends BGPPeerStateImpl implements BGPRouteEntryImp } @Override - public synchronized final PeerId getPeerId() { + public final synchronized PeerId getPeerId() { return this.peerId; } @@ -253,7 +257,7 @@ abstract class AbstractPeer extends BGPPeerStateImpl implements BGPRouteEntryImp final KeyedInstanceIdentifier tableRibout = getRibOutIId(tk); effAttr.ifPresent(attributes - -> storeRoute(ribSupport, addPathSupported, tableRibout, initializingRoute, route, attributes, tx)); + -> storeRoute(ribSupport, addPathSupported, tableRibout, initializingRoute, route, attributes, tx)); } final FluentFuture future = tx.commit(); @@ -359,9 +363,9 @@ abstract class AbstractPeer extends BGPPeerStateImpl implements BGPRouteEntryImp } private , S extends ChildOf, - R extends Route & ChildOf & Identifiable, I extends Identifier> - void installRouteRibOut(final RouteEntryDependenciesContainer entryDep, - final List> routes, final WriteTransaction tx) { + R extends Route & ChildOf & Identifiable, I extends Identifier> void installRouteRibOut( + final RouteEntryDependenciesContainer entryDep, final List> routes, + final WriteTransaction tx) { final TablesKey tk = entryDep.getRIBSupport().getTablesKey(); final BGPPeerTracker peerTracker = entryDep.getPeerTracker(); final RIBSupport ribSupport = entryDep.getRIBSupport(); @@ -396,7 +400,7 @@ abstract class AbstractPeer extends BGPPeerStateImpl implements BGPRouteEntryImp effAttr = routingPolicies.applyExportPolicies(routeEntry, attributes, entryDep.getAfiSafType()); } effAttr.ifPresent(attributes1 - -> storeRoute(ribSupport, addPathSupported, tableRibout, advRoute, route, attributes1, tx)); + -> storeRoute(ribSupport, addPathSupported, tableRibout, advRoute, route, attributes1, tx)); } } @@ -410,15 +414,15 @@ abstract class AbstractPeer extends BGPPeerStateImpl implements BGPRouteEntryImp final KeyedInstanceIdentifier tableRibout = getRibOutIId(tk); final boolean addPathSupported = supportsAddPathSupported(tk); staleRoutesIid.forEach(staleRouteIid - -> removeRoute(ribSupport, addPathSupported, tableRibout, staleRouteIid, tx)); + -> removeRoute(ribSupport, addPathSupported, tableRibout, staleRouteIid, tx)); } private , S extends ChildOf, - R extends Route & ChildOf & Identifiable, I extends Identifier> - void storeRoute(final RIBSupport ribSupport, final boolean addPathSupported, - final KeyedInstanceIdentifier tableRibout, - final RouteKeyIdentifier advRoute, final R route, final Attributes effAttr, - final WriteTransaction tx) { + R extends Route & ChildOf & Identifiable, I extends Identifier> void storeRoute( + final RIBSupport ribSupport, final boolean addPathSupported, + final KeyedInstanceIdentifier tableRibout, + final RouteKeyIdentifier advRoute, final R route, final Attributes effAttr, + final WriteTransaction tx) { final InstanceIdentifier ribOut; final I newKey; if (!addPathSupported) {