Propagate depreferenced status through AbstractAdvertizedRoute
[bgpcep.git] / bgp / rib-spi / src / main / java / org / opendaylight / protocol / bgp / rib / spi / entry / AbstractAdvertizedRoute.java
index 9d1cc387b5f1623b0101ccc8b639a47b2d5ca40d..2d974e58c4b21c1d10f11a2285baff4143c4b1e8 100644 (file)
@@ -38,12 +38,14 @@ public abstract class AbstractAdvertizedRoute<C extends Routes & DataObject & Ch
     private final Attributes attributes;
     private final I nonAddPathRouteKeyIdentifier;
     private final I addPathRouteKeyIdentifier;
+    private final boolean depreferenced;
 
     AbstractAdvertizedRoute(final RIBSupport<C, S, R, I> ribSupport, final R route, final PeerId fromPeerId,
-            final Attributes attributes) {
+            final Attributes attributes, final boolean depreferenced) {
         this.fromPeerId = fromPeerId;
         this.route = route;
         this.attributes = attributes;
+        this.depreferenced = depreferenced;
 
         final @NonNull String routeKey = verifyNotNull(route.getRouteKey());
         this.nonAddPathRouteKeyIdentifier = ribSupport.createRouteListKey(NON_PATH_ID_VALUE, routeKey);
@@ -62,6 +64,10 @@ public abstract class AbstractAdvertizedRoute<C extends Routes & DataObject & Ch
         return attributes;
     }
 
+    public final boolean isDepreferenced() {
+        return depreferenced;
+    }
+
     @Override
     public final I getNonAddPathRouteKeyIdentifier() {
         return this.nonAddPathRouteKeyIdentifier;