Fix some rib-impl warnigs
[bgpcep.git] / bgp / rib-impl / src / main / java / org / opendaylight / protocol / bgp / rib / impl / AbstractPeer.java
index f79b95f21ccd479649043fc0f6b9daf741d02bcd..4d0eb7b8105115971396e7ff9accd63eab89368b 100644 (file)
@@ -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<TablesKey> afiSafisAdvertized,
-            final Set<TablesKey> afiSafisGracefulAdvertized) {
-        super(rib.getInstanceIdentifier(), groupId, neighborAddress, afiSafisAdvertized, afiSafisGracefulAdvertized);
+            final Set<TablesKey> afiSafisGracefulAdvertized,
+            final Map<TablesKey, Integer> 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<TablesKey> afiSafisGracefulAdvertized) {
         this(rib, peerName, groupId, role, null, null, neighborAddress,
-                rib.getLocalTablesKeys(), afiSafisGracefulAdvertized);
+                rib.getLocalTablesKeys(), afiSafisGracefulAdvertized, Collections.emptyMap());
     }
 
     final synchronized FluentFuture<? extends CommitInfo> 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<Tables, TablesKey> tableRibout = getRibOutIId(tk);
 
             effAttr.ifPresent(attributes
-                    -> storeRoute(ribSupport, addPathSupported, tableRibout, initializingRoute, route, attributes, tx));
+                -> storeRoute(ribSupport, addPathSupported, tableRibout, initializingRoute, route, attributes, tx));
         }
 
         final FluentFuture<? extends CommitInfo> future = tx.commit();
@@ -359,9 +363,9 @@ abstract class AbstractPeer extends BGPPeerStateImpl implements BGPRouteEntryImp
     }
 
     private <C extends Routes & DataObject & ChoiceIn<Tables>, S extends ChildOf<? super C>,
-            R extends Route & ChildOf<? super S> & Identifiable<I>, I extends Identifier<R>>
-    void installRouteRibOut(final RouteEntryDependenciesContainer entryDep,
-            final List<AdvertizedRoute<C, S, R, I>> routes, final WriteTransaction tx) {
+            R extends Route & ChildOf<? super S> & Identifiable<I>, I extends Identifier<R>> void installRouteRibOut(
+                    final RouteEntryDependenciesContainer entryDep, final List<AdvertizedRoute<C, S, R, I>> routes,
+                    final WriteTransaction tx) {
         final TablesKey tk = entryDep.getRIBSupport().getTablesKey();
         final BGPPeerTracker peerTracker = entryDep.getPeerTracker();
         final RIBSupport<C, S, R, I> 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<Tables, TablesKey> tableRibout = getRibOutIId(tk);
         final boolean addPathSupported = supportsAddPathSupported(tk);
         staleRoutesIid.forEach(staleRouteIid
-                -> removeRoute(ribSupport, addPathSupported, tableRibout, staleRouteIid, tx));
+            -> removeRoute(ribSupport, addPathSupported, tableRibout, staleRouteIid, tx));
     }
 
     private <C extends Routes & DataObject & ChoiceIn<Tables>, S extends ChildOf<? super C>,
-            R extends Route & ChildOf<? super S> & Identifiable<I>, I extends Identifier<R>>
-    void storeRoute(final RIBSupport<C, S, R, I> ribSupport, final boolean addPathSupported,
-            final KeyedInstanceIdentifier<Tables, TablesKey> tableRibout,
-            final RouteKeyIdentifier<R, I> advRoute, final R route, final Attributes effAttr,
-            final WriteTransaction tx) {
+            R extends Route & ChildOf<? super S> & Identifiable<I>, I extends Identifier<R>> void storeRoute(
+                    final RIBSupport<C, S, R, I> ribSupport, final boolean addPathSupported,
+                    final KeyedInstanceIdentifier<Tables, TablesKey> tableRibout,
+                    final RouteKeyIdentifier<R, I> advRoute, final R route, final Attributes effAttr,
+                    final WriteTransaction tx) {
         final InstanceIdentifier<R> ribOut;
         final I newKey;
         if (!addPathSupported) {