Class RIBImpl
- java.lang.Object
-
- org.opendaylight.protocol.bgp.rib.DefaultRibReference
-
- org.opendaylight.protocol.bgp.rib.impl.state.BGPRibStateImpl
-
- org.opendaylight.protocol.bgp.rib.impl.RIBImpl
-
- All Implemented Interfaces:
AutoCloseable
,EventListener
,org.opendaylight.mdsal.binding.api.TransactionChainListener
,org.opendaylight.mdsal.dom.api.DOMTransactionChainListener
,RIB
,RibOutRefresh
,RibReference
,BGPRibState
,BGPRibStateConsumer
,InstanceReference<Rib>
,org.opendaylight.yangtools.yang.model.api.SchemaContextListener
public final class RIBImpl extends BGPRibStateImpl implements RIB, org.opendaylight.mdsal.binding.api.TransactionChainListener, org.opendaylight.mdsal.dom.api.DOMTransactionChainListener, org.opendaylight.yangtools.yang.model.api.SchemaContextListener, AutoCloseable
-
-
Constructor Summary
Constructors Constructor Description RIBImpl(BGPTableTypeRegistryConsumer tableTypeRegistry, RibId ribId, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.AsNumber localAs, BgpId localBgpId, RIBExtensionConsumerContext extensions, BGPDispatcher dispatcher, CodecsRegistryImpl codecsRegistry, org.opendaylight.mdsal.dom.api.DOMDataBroker domDataBroker, org.opendaylight.mdsal.binding.api.DataBroker dataBroker, BGPRibRoutingPolicy ribPolicies, List<BgpTableType> localTables, Map<TablesKey,PathSelectionMode> bestPathSelectionStrategies)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
com.google.common.util.concurrent.FluentFuture<? extends org.opendaylight.mdsal.common.api.CommitInfo>
closeServiceInstance()
org.opendaylight.mdsal.binding.api.TransactionChain
createPeerChain(org.opendaylight.mdsal.binding.api.TransactionChainListener listener)
Allocate a new transaction chain for use with a peer.org.opendaylight.mdsal.dom.api.DOMTransactionChain
createPeerDOMChain(org.opendaylight.mdsal.dom.api.DOMTransactionChainListener listener)
Allocate a new transaction chain for use with a peer.BgpId
getBgpIdentifier()
CodecsRegistry
getCodecsRegistry()
org.opendaylight.mdsal.binding.api.DataBroker
getDataBroker()
Return DataBroker.BGPDispatcher
getDispatcher()
org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.AsNumber
getLocalAs()
RIB AS.Set<? extends BgpTableType>
getLocalTables()
Return the set of table identifiers which are accepted and advertised by this RIB instance.Set<TablesKey>
getLocalTablesKeys()
BGPPeerTracker
getPeerTracker()
Returns peer tracker for the rib.RIBExtensionConsumerContext
getRibExtensions()
Return the RIB extensions available to the RIB instance.BGPRibRoutingPolicy
getRibPolicies()
Return Policies Container.RIBSupportContextRegistry
getRibSupportContext()
Return the RIB extensions available to the RIB instance with additional RIB specific context such as translation between DOM and Binding.org.opendaylight.mdsal.dom.api.DOMDataTreeChangeService
getService()
Return instance of DOMDataTreeChangeService, where consumer can register to listen on DOM data changes.org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier
getYangRibId()
Return YangInstanceIdentifier of BGP Rib with its RibId.void
instantiateServiceInstance()
void
onGlobalContextUpdated(org.opendaylight.yangtools.yang.model.api.SchemaContext context)
void
onTransactionChainFailed(org.opendaylight.mdsal.binding.api.TransactionChain chain, org.opendaylight.mdsal.binding.api.Transaction transaction, Throwable cause)
void
onTransactionChainFailed(org.opendaylight.mdsal.dom.api.DOMTransactionChain chain, org.opendaylight.mdsal.dom.api.DOMDataTreeTransaction transaction, Throwable cause)
void
onTransactionChainSuccessful(org.opendaylight.mdsal.binding.api.TransactionChain chain)
void
onTransactionChainSuccessful(org.opendaylight.mdsal.dom.api.DOMTransactionChain chain)
void
refreshTable(TablesKey tk, PeerId peerId)
Triggers the reevaluation.boolean
supportsTable(TablesKey tableKey)
Returns true if RIB supports table.String
toString()
-
Methods inherited from class org.opendaylight.protocol.bgp.rib.impl.state.BGPRibStateImpl
getAs, getPathCount, getPathsCount, getPrefixesCount, getRIBState, getRouteId, getTablesPrefixesCount, getTotalPathsCount, getTotalPrefixesCount, isActive, registerTotalPathCounter, registerTotalPrefixesCounter, setActive
-
Methods inherited from class org.opendaylight.protocol.bgp.rib.DefaultRibReference
getInstanceIdentifier
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.opendaylight.protocol.bgp.rib.RibReference
getInstanceIdentifier
-
-
-
-
Constructor Detail
-
RIBImpl
public RIBImpl(BGPTableTypeRegistryConsumer tableTypeRegistry, RibId ribId, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.AsNumber localAs, BgpId localBgpId, RIBExtensionConsumerContext extensions, BGPDispatcher dispatcher, CodecsRegistryImpl codecsRegistry, org.opendaylight.mdsal.dom.api.DOMDataBroker domDataBroker, org.opendaylight.mdsal.binding.api.DataBroker dataBroker, BGPRibRoutingPolicy ribPolicies, List<BgpTableType> localTables, Map<TablesKey,PathSelectionMode> bestPathSelectionStrategies)
-
-
Method Detail
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
-
getLocalAs
public org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.AsNumber getLocalAs()
Description copied from interface:RIB
RIB AS.- Specified by:
getLocalAs
in interfaceRIB
- Returns:
- AS
-
getBgpIdentifier
public BgpId getBgpIdentifier()
- Specified by:
getBgpIdentifier
in interfaceRIB
-
getLocalTables
public Set<? extends BgpTableType> getLocalTables()
Description copied from interface:RIB
Return the set of table identifiers which are accepted and advertised by this RIB instance.- Specified by:
getLocalTables
in interfaceRIB
- Returns:
- A set of identifiers.
-
getDispatcher
public BGPDispatcher getDispatcher()
- Specified by:
getDispatcher
in interfaceRIB
-
onTransactionChainFailed
public void onTransactionChainFailed(org.opendaylight.mdsal.binding.api.TransactionChain chain, org.opendaylight.mdsal.binding.api.Transaction transaction, Throwable cause)
- Specified by:
onTransactionChainFailed
in interfaceorg.opendaylight.mdsal.binding.api.TransactionChainListener
-
onTransactionChainFailed
public void onTransactionChainFailed(org.opendaylight.mdsal.dom.api.DOMTransactionChain chain, org.opendaylight.mdsal.dom.api.DOMDataTreeTransaction transaction, Throwable cause)
- Specified by:
onTransactionChainFailed
in interfaceorg.opendaylight.mdsal.dom.api.DOMTransactionChainListener
-
onTransactionChainSuccessful
public void onTransactionChainSuccessful(org.opendaylight.mdsal.binding.api.TransactionChain chain)
- Specified by:
onTransactionChainSuccessful
in interfaceorg.opendaylight.mdsal.binding.api.TransactionChainListener
-
onTransactionChainSuccessful
public void onTransactionChainSuccessful(org.opendaylight.mdsal.dom.api.DOMTransactionChain chain)
- Specified by:
onTransactionChainSuccessful
in interfaceorg.opendaylight.mdsal.dom.api.DOMTransactionChainListener
-
getLocalTablesKeys
public Set<TablesKey> getLocalTablesKeys()
- Specified by:
getLocalTablesKeys
in interfaceRIB
-
supportsTable
public boolean supportsTable(TablesKey tableKey)
Description copied from interface:RIB
Returns true if RIB supports table.- Specified by:
supportsTable
in interfaceRIB
- Parameters:
tableKey
- table- Returns:
- true if supported
-
getRibPolicies
public BGPRibRoutingPolicy getRibPolicies()
Description copied from interface:RIB
Return Policies Container.- Specified by:
getRibPolicies
in interfaceRIB
- Returns:
- policies
-
getPeerTracker
public BGPPeerTracker getPeerTracker()
Description copied from interface:RIB
Returns peer tracker for the rib.- Specified by:
getPeerTracker
in interfaceRIB
- Returns:
- peer tracker
-
refreshTable
public void refreshTable(TablesKey tk, PeerId peerId)
Description copied from interface:RibOutRefresh
Triggers the reevaluation.- Specified by:
refreshTable
in interfaceRibOutRefresh
- Parameters:
tk
- table key of table route paths to be reevaluatedpeerId
- peer to advertize / withdraw paths after reevaluation
-
getService
public org.opendaylight.mdsal.dom.api.DOMDataTreeChangeService getService()
Description copied from interface:RIB
Return instance of DOMDataTreeChangeService, where consumer can register to listen on DOM data changes.- Specified by:
getService
in interfaceRIB
- Returns:
- DOMDataTreeChangeService
-
getDataBroker
public org.opendaylight.mdsal.binding.api.DataBroker getDataBroker()
Description copied from interface:RIB
Return DataBroker.- Specified by:
getDataBroker
in interfaceRIB
- Returns:
- DataBroker
-
getYangRibId
public org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier getYangRibId()
Description copied from interface:RIB
Return YangInstanceIdentifier of BGP Rib with its RibId.- Specified by:
getYangRibId
in interfaceRIB
- Returns:
- YangInstanceIdentifier
-
createPeerChain
public org.opendaylight.mdsal.binding.api.TransactionChain createPeerChain(org.opendaylight.mdsal.binding.api.TransactionChainListener listener)
Description copied from interface:RIB
Allocate a new transaction chain for use with a peer.- Specified by:
createPeerChain
in interfaceRIB
- Parameters:
listener
-TransactionChainListener
handling recovery- Returns:
- A new transaction chain.
-
createPeerDOMChain
public org.opendaylight.mdsal.dom.api.DOMTransactionChain createPeerDOMChain(org.opendaylight.mdsal.dom.api.DOMTransactionChainListener listener)
Description copied from interface:RIB
Allocate a new transaction chain for use with a peer.- Specified by:
createPeerDOMChain
in interfaceRIB
- Parameters:
listener
-TransactionChainListener
handling recovery- Returns:
- A new transaction chain.
-
getRibExtensions
public RIBExtensionConsumerContext getRibExtensions()
Description copied from interface:RIB
Return the RIB extensions available to the RIB instance.- Specified by:
getRibExtensions
in interfaceRIB
- Returns:
- RIB extensions handle.
-
getRibSupportContext
public RIBSupportContextRegistry getRibSupportContext()
Description copied from interface:RIB
Return the RIB extensions available to the RIB instance with additional RIB specific context such as translation between DOM and Binding.- Specified by:
getRibSupportContext
in interfaceRIB
- Returns:
- RIB extensions handle.
-
onGlobalContextUpdated
public void onGlobalContextUpdated(org.opendaylight.yangtools.yang.model.api.SchemaContext context)
- Specified by:
onGlobalContextUpdated
in interfaceorg.opendaylight.yangtools.yang.model.api.SchemaContextListener
-
getCodecsRegistry
public CodecsRegistry getCodecsRegistry()
- Specified by:
getCodecsRegistry
in interfaceRIB
-
instantiateServiceInstance
public void instantiateServiceInstance()
-
closeServiceInstance
public com.google.common.util.concurrent.FluentFuture<? extends org.opendaylight.mdsal.common.api.CommitInfo> closeServiceInstance()
-
-