2 * Copyright (c) 2013 Cisco Systems, Inc. and others. 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;
10 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev130919.Update;
11 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev130919.path.attributes.Attributes;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev130919.update.attributes.MpReachNlri;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev130919.update.attributes.MpReachNlriBuilder;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev130919.update.attributes.MpUnreachNlri;
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev130925.Route;
18 public interface AdjRIBsIn<K, V extends Route> {
21 * Adds routes to this adjacency rib.
22 * @param trans data-store transaction
23 * @param peer advertising peer
25 * @param attributes route attributes
27 void addRoutes(final AdjRIBsTransaction trans, final Peer peer, final MpReachNlri nlri, final Attributes attributes);
30 * Removes routes from this adjacency rib.
31 * @param trans data-store transaction
32 * @param peer advertising peer
35 void removeRoutes(final AdjRIBsTransaction trans, final Peer peer, final MpUnreachNlri nlri);
38 * Clears adjacency rib tables.
39 * @param trans data-store transaction
40 * @param peer advertising peer
42 void clear(final AdjRIBsTransaction trans, final Peer peer);
45 * Marks true or false the state of this adjacency rib.
46 * @param trans data-store transaction
47 * @param peer advertising peer
49 void markUptodate(final AdjRIBsTransaction trans, final Peer peer);
52 * Transform an advertised data object into the corresponding NLRI in MP_REACH attribute.
53 * @param builder MP_REACH attribute builder
54 * @param data Data object
56 void addAdvertisement(final MpReachNlriBuilder builder, final V data);
59 * Creates end-of-rib message for this adjacency rib.
60 * @return BGP Update message