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.impl.spi;
11 import org.eclipse.jdt.annotation.NonNull;
12 import org.opendaylight.mdsal.dom.api.DOMDataBroker.DataTreeChangeExtension;
13 import org.opendaylight.mdsal.dom.api.DOMTransactionChain;
14 import org.opendaylight.protocol.bgp.rib.RibReference;
15 import org.opendaylight.protocol.bgp.rib.spi.BGPPeerTracker;
16 import org.opendaylight.protocol.bgp.rib.spi.RIBExtensionConsumerContext;
17 import org.opendaylight.protocol.bgp.rib.spi.policy.BGPRibRoutingPolicy;
18 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.AsNumber;
19 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.BgpTableType;
20 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.rib.TablesKey;
21 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev200120.BgpId;
22 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
25 * Internal reference to a RIB instance.
27 public interface RIB extends RibReference, RibOutRefresh {
33 AsNumber getLocalAs();
35 BgpId getBgpIdentifier();
38 * Return the set of table identifiers which are accepted and advertised
39 * by this RIB instance.
41 * @return A set of identifiers.
43 @NonNull Set<? extends BgpTableType> getLocalTables();
45 BGPDispatcher getDispatcher();
48 * Allocate a new transaction chain for use with a peer.
50 * @return A new transaction chain.
52 DOMTransactionChain createPeerDOMChain();
55 * Return the RIB extensions available to the RIB instance.
57 * @return RIB extensions handle.
59 RIBExtensionConsumerContext getRibExtensions();
62 * Return the RIB extensions available to the RIB instance
63 * with additional RIB specific context such as
64 * translation between DOM and Binding.
66 * @return RIB extensions handle.
68 RIBSupportContextRegistry getRibSupportContext();
71 * Return YangInstanceIdentifier of BGP Rib with its RibId.
73 * @return YangInstanceIdentifier
75 YangInstanceIdentifier getYangRibId();
77 CodecsRegistry getCodecsRegistry();
80 * Return instance of DOMDataTreeChangeService, where consumer can register to
81 * listen on DOM data changes.
83 * @return DOMDataTreeChangeService
85 DataTreeChangeExtension getService();
88 * Returns true if RIB supports table.
90 * @param tableKey table
91 * @return true if supported
93 boolean supportsTable(TablesKey tableKey);
95 Set<TablesKey> getLocalTablesKeys();
98 * Return Policies Container.
102 BGPRibRoutingPolicy getRibPolicies();
105 * Returns peer tracker for the rib.
107 * @return peer tracker
109 BGPPeerTracker getPeerTracker();