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.DOMDataTreeChangeService;
13 import org.opendaylight.mdsal.dom.api.DOMTransactionChain;
14 import org.opendaylight.mdsal.dom.api.DOMTransactionChainListener;
15 import org.opendaylight.protocol.bgp.rib.RibReference;
16 import org.opendaylight.protocol.bgp.rib.spi.BGPPeerTracker;
17 import org.opendaylight.protocol.bgp.rib.spi.RIBExtensionConsumerContext;
18 import org.opendaylight.protocol.bgp.rib.spi.policy.BGPRibRoutingPolicy;
19 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.AsNumber;
20 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.BgpTableType;
21 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.rib.TablesKey;
22 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev200120.BgpId;
23 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
26 * Internal reference to a RIB instance.
28 public interface RIB extends RibReference, RibOutRefresh {
34 AsNumber getLocalAs();
36 BgpId getBgpIdentifier();
39 * Return the set of table identifiers which are accepted and advertised
40 * by this RIB instance.
42 * @return A set of identifiers.
44 @NonNull Set<? extends BgpTableType> getLocalTables();
46 BGPDispatcher getDispatcher();
49 * Allocate a new transaction chain for use with a peer.
51 * @param listener {@link DOMTransactionChainListener} handling recovery
52 * @return A new transaction chain.
54 DOMTransactionChain createPeerDOMChain(DOMTransactionChainListener listener);
57 * Return the RIB extensions available to the RIB instance.
59 * @return RIB extensions handle.
61 RIBExtensionConsumerContext getRibExtensions();
64 * Return the RIB extensions available to the RIB instance
65 * with additional RIB specific context such as
66 * translation between DOM and Binding.
68 * @return RIB extensions handle.
70 RIBSupportContextRegistry getRibSupportContext();
73 * Return YangInstanceIdentifier of BGP Rib with its RibId.
75 * @return YangInstanceIdentifier
77 YangInstanceIdentifier getYangRibId();
79 CodecsRegistry getCodecsRegistry();
82 * Return instance of DOMDataTreeChangeService, where consumer can register to
83 * listen on DOM data changes.
85 * @return DOMDataTreeChangeService
87 DOMDataTreeChangeService getService();
90 * Returns true if RIB supports table.
92 * @param tableKey table
93 * @return true if supported
95 boolean supportsTable(TablesKey tableKey);
97 Set<TablesKey> getLocalTablesKeys();
100 * Return Policies Container.
104 BGPRibRoutingPolicy getRibPolicies();
107 * Returns peer tracker for the rib.
109 * @return peer tracker
111 BGPPeerTracker getPeerTracker();