X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=bgp%2Frib-impl%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fprotocol%2Fbgp%2Frib%2Fimpl%2Fspi%2FRIB.java;h=9896ba8e7236f1fc4594ef48e5762eb3ce113ad9;hb=HEAD;hp=3fe8ce3425f98af58ea6bc9a9262c2c5d9f4a94e;hpb=1441c59233fca7a55c16a121bd75a32ca67776a9;p=bgpcep.git diff --git a/bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/spi/RIB.java b/bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/spi/RIB.java old mode 100755 new mode 100644 index 3fe8ce3425..9896ba8e72 --- a/bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/spi/RIB.java +++ b/bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/spi/RIB.java @@ -8,25 +8,28 @@ package org.opendaylight.protocol.bgp.rib.impl.spi; import java.util.Set; -import javax.annotation.Nonnull; -import org.opendaylight.controller.md.sal.common.api.data.TransactionChainListener; -import org.opendaylight.controller.md.sal.dom.api.DOMDataTreeChangeService; -import org.opendaylight.controller.md.sal.dom.api.DOMTransactionChain; -import org.opendaylight.mdsal.singleton.common.api.ClusterSingletonServiceProvider; -import org.opendaylight.mdsal.singleton.common.api.ServiceGroupIdentifier; +import org.eclipse.jdt.annotation.NonNull; +import org.opendaylight.mdsal.dom.api.DOMDataBroker.DataTreeChangeExtension; +import org.opendaylight.mdsal.dom.api.DOMTransactionChain; import org.opendaylight.protocol.bgp.rib.RibReference; -import org.opendaylight.protocol.bgp.rib.spi.ExportPolicyPeerTracker; +import org.opendaylight.protocol.bgp.rib.spi.BGPPeerTracker; import org.opendaylight.protocol.bgp.rib.spi.RIBExtensionConsumerContext; +import org.opendaylight.protocol.bgp.rib.spi.policy.BGPRibRoutingPolicy; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.AsNumber; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev130919.BgpTableType; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev130925.rib.TablesKey; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev130919.BgpId; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.BgpTableType; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.rib.TablesKey; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev200120.BgpId; import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; /** * Internal reference to a RIB instance. */ -public interface RIB extends RibReference, ClusterSingletonServiceProvider { +public interface RIB extends RibReference, RibOutRefresh { + /** + * RIB AS. + * + * @return AS + */ AsNumber getLocalAs(); BgpId getBgpIdentifier(); @@ -37,18 +40,16 @@ public interface RIB extends RibReference, ClusterSingletonServiceProvider { * * @return A set of identifiers. */ - @Nonnull - Set getLocalTables(); + @NonNull Set getLocalTables(); BGPDispatcher getDispatcher(); /** * Allocate a new transaction chain for use with a peer. * - * @param listener {@link TransactionChainListener} handling recovery * @return A new transaction chain. */ - DOMTransactionChain createPeerChain(TransactionChainListener listener); + DOMTransactionChain createPeerDOMChain(); /** * Return the RIB extensions available to the RIB instance. @@ -81,26 +82,29 @@ public interface RIB extends RibReference, ClusterSingletonServiceProvider { * * @return DOMDataTreeChangeService */ - DOMDataTreeChangeService getService(); - - ImportPolicyPeerTracker getImportPolicyPeerTracker(); + DataTreeChangeExtension getService(); /** - * Returns ExportPolicyPeerTracker for specific tableKey, where peer can register himself - * as supporting the table. Same export policy can be used to check which peers support respective - * table and announce then routes if required. + * Returns true if RIB supports table. * - * @param tablesKey supported table - * @return ExportPolicyPeerTracker + * @param tableKey table + * @return true if supported */ - ExportPolicyPeerTracker getExportPolicyPeerTracker(TablesKey tablesKey); + boolean supportsTable(TablesKey tableKey); Set getLocalTablesKeys(); /** - * Return common ServiceGroupIdentifier to be used between same group cluster service + * Return Policies Container. + * + * @return policies + */ + BGPRibRoutingPolicy getRibPolicies(); + + /** + * Returns peer tracker for the rib. * - * @return ServiceGroupIdentifier + * @return peer tracker */ - ServiceGroupIdentifier getRibIServiceGroupIdentifier(); + BGPPeerTracker getPeerTracker(); }