2 * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.protocol.bgp.rib.spi.entry;
10 import org.opendaylight.protocol.bgp.rib.spi.RIBSupport;
11 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev180329.path.attributes.Attributes;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.PeerId;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.Route;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.rib.Tables;
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.rib.tables.Routes;
16 import org.opendaylight.yangtools.yang.binding.ChildOf;
17 import org.opendaylight.yangtools.yang.binding.ChoiceIn;
18 import org.opendaylight.yangtools.yang.binding.DataObject;
19 import org.opendaylight.yangtools.yang.binding.Identifiable;
20 import org.opendaylight.yangtools.yang.binding.Identifier;
23 * new Routes to be advertized.
25 * @author Claudio D. Gasparini
27 public final class AdvertizedRoute<C extends Routes & DataObject & ChoiceIn<Tables>,
28 S extends ChildOf<? super C>, R extends Route & ChildOf<? super S> & Identifiable<I>,
29 I extends Identifier<R>> extends AbstractAdvertizedRoute<C, S, R, I> {
30 private final boolean isFirstBestPath;
32 public AdvertizedRoute(final RIBSupport<C, S, R, I> ribSupport, final R route, final Attributes attributes,
33 final PeerId fromPeerId, final boolean depreferenced) {
34 this(ribSupport, true, route, attributes, fromPeerId, depreferenced);
37 public AdvertizedRoute(final RIBSupport<C, S, R, I> ribSupport, final boolean isFirstBestPath,
38 final R route, final Attributes attributes, final PeerId fromPeerId, final boolean depreferenced) {
39 super(ribSupport, route, fromPeerId, attributes, depreferenced);
40 this.isFirstBestPath = isFirstBestPath;
43 public boolean isFirstBestPath() {
44 return this.isFirstBestPath;