Class BGPPeerStateImpl
java.lang.Object
org.opendaylight.protocol.bgp.rib.DefaultRibReference
org.opendaylight.protocol.bgp.rib.impl.state.BGPPeerStateImpl
- All Implemented Interfaces:
BGPMessagesListener,RibReference,BGPAfiSafiState,BGPErrorHandlingState,BGPGracelfulRestartState,BGPLlGracelfulRestartState,BGPPeerMessagesState,BGPPeerState,BGPPeerStateProvider,InstanceReference<Rib>
- Direct Known Subclasses:
ApplicationPeer,BGPPeer
public abstract class BGPPeerStateImpl
extends DefaultRibReference
implements BGPPeerState, BGPAfiSafiState, BGPGracelfulRestartState, BGPLlGracelfulRestartState, BGPErrorHandlingState, BGPPeerMessagesState, BGPPeerStateProvider, BGPMessagesListener
-
Constructor Summary
ConstructorsConstructorDescriptionBGPPeerStateImpl(@NonNull org.opendaylight.yangtools.yang.binding.KeyedInstanceIdentifier<Rib, RibKey> instanceIdentifier, @Nullable String groupId, @NonNull org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddressNoZone neighborAddress, @NonNull Set<TablesKey> afiSafisAdvertized, @NonNull Set<TablesKey> afiSafisGracefulAdvertized, @NonNull Map<TablesKey, Integer> afiSafisLlGracefulAdvertized) -
Method Summary
Modifier and TypeMethodDescriptionList of TablesKey - Afi Safi Advertized to the neighbor.List of TablesKey - Afi Safi Advertized by neighbor.final BGPGracelfulRestartStateBGP Operational GracelfulRestart State.final BGPPeerMessagesStateBGP Message Operational State.final longErroneous Update Received count.final StringPeerGroup Id.final intgetLlGracefulRestartTimer(TablesKey tablesKey) If table is both advertised and received return timer with lower value.getMode()Returns operational mode of graceful restart.final org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddressNoZoneReturn Neighbor Key/Address.final longNotification Update Messages Received count.final longNotification Messages Sent count.final intThe period of time (advertised by the peer) that the peer expects a restart of a BGP session to take.final BGPPeerStateReturns Peer Operational State.final longgetPrefixesInstalledCount(TablesKey tablesKey) Prefixes installed per specific tablekey.final longgetPrefixesReceivedCount(TablesKey tablesKey) Prefixed received from the peer count.final longgetPrefixesSentCount(TablesKey tablesKey) Prefixed sent to the Peer count.final longPrefixes installed under Effective-Rib-In for a BGP neighbor.final longUpdate Messages Received count.final longUpdate Messages Sent count.final booleanisActive()Indicates whether this instance is being actively managed and updated.final booleanisAfiSafiSupported(TablesKey tablesKey) is AfiSafi Supported.final booleanisGracefulRestartAdvertized(TablesKey tablesKey) is Graceful Restart Supported advertized to neighbor.final booleanisGracefulRestartReceived(TablesKey tablesKey) is Graceful Restart Supported advertized by neighbor.final booleanisLlGracefulRestartAdvertised(TablesKey tablesKey) is Long-lived Graceful Restart Support advertised to neighbor.final booleanisLlGracefulRestartReceived(TablesKey tablesKey) is Long-lived Graceful Restart Support advertised by neighbor.final booleanThis flag indicates whether the local neighbor is currently restarting.final booleanThis flag indicates whether the remote neighbor is currently in the process of restarting, and hence received routes are currently stale.final voidmessageReceived(org.opendaylight.yangtools.yang.binding.Notification<?> msg) Fired when message is received.final voidmessageSent(org.opendaylight.yangtools.yang.binding.Notification<?> msg) Fired when message is sent.protected final voidregisterPrefixesCounters(@NonNull PrefixesReceivedCounters newPrefixesReceived, @NonNull PrefixesInstalledCounters newPrefixesInstalled) protected final voidregisterPrefixesSentCounter(TablesKey tablesKey, PrefixesSentCounters prefixesSentCounter) protected final voidprotected final voidsetActive(boolean active) protected final voidsetAdvertizedGracefulRestartTableTypes(List<TablesKey> receivedGraceful) final voidsetAdvertizedLlGracefulRestartTableTypes(Map<TablesKey, Integer> afiSafiReceived) final voidsetAfiSafiGracefulRestartState(int newPeerRestartTime, boolean newPeerRestarting, boolean newLocalRestarting) protected final voidsetLocalRestartingState(boolean restarting) protected final voidMethods inherited from class org.opendaylight.protocol.bgp.rib.DefaultRibReference
getInstanceIdentifierMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opendaylight.protocol.bgp.rib.spi.state.BGPPeerState
getBGPAfiSafiState, getBGPErrorHandlingState, getBGPSessionState, getBGPTimersState, getBGPTransportState, getTotalPathsCountMethods inherited from interface org.opendaylight.protocol.bgp.rib.RibReference
getInstanceIdentifier
-
Constructor Details
-
BGPPeerStateImpl
public BGPPeerStateImpl(@NonNull org.opendaylight.yangtools.yang.binding.KeyedInstanceIdentifier<Rib, RibKey> instanceIdentifier, @Nullable String groupId, @NonNull org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddressNoZone neighborAddress, @NonNull Set<TablesKey> afiSafisAdvertized, @NonNull Set<TablesKey> afiSafisGracefulAdvertized, @NonNull Map<TablesKey, Integer> afiSafisLlGracefulAdvertized)
-
-
Method Details
-
getGroupId
Description copied from interface:BGPPeerStatePeerGroup Id.- Specified by:
getGroupIdin interfaceBGPPeerState- Returns:
- PeerGroup Id
-
getNeighborAddress
public final org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddressNoZone getNeighborAddress()Description copied from interface:BGPPeerStateReturn Neighbor Key/Address.- Specified by:
getNeighborAddressin interfaceBGPPeerState- Returns:
- neighbor Address
-
getTotalPrefixes
public final long getTotalPrefixes()Description copied from interface:BGPPeerStatePrefixes installed under Effective-Rib-In for a BGP neighbor.- Specified by:
getTotalPrefixesin interfaceBGPPeerState- Returns:
- Paths counter
-
getBGPPeerMessagesState
Description copied from interface:BGPPeerStateBGP Message Operational State.- Specified by:
getBGPPeerMessagesStatein interfaceBGPPeerState- Returns:
- BGPPeerMessagesState
-
getBGPGracelfulRestart
Description copied from interface:BGPPeerStateBGP Operational GracelfulRestart State.- Specified by:
getBGPGracelfulRestartin interfaceBGPPeerState- Returns:
- BGPGracelfulRestartState
-
isAfiSafiSupported
Description copied from interface:BGPAfiSafiStateis AfiSafi Supported.- Specified by:
isAfiSafiSupportedin interfaceBGPAfiSafiState- Parameters:
tablesKey- tables Key- Returns:
- true if Afi Safi was advertized to and by the neighbor
-
getPrefixesInstalledCount
Description copied from interface:BGPAfiSafiStatePrefixes installed per specific tablekey.- Specified by:
getPrefixesInstalledCountin interfaceBGPAfiSafiState- Parameters:
tablesKey- tables Key- Returns:
- count
-
getPrefixesSentCount
Description copied from interface:BGPAfiSafiStatePrefixed sent to the Peer count.- Specified by:
getPrefixesSentCountin interfaceBGPAfiSafiState- Parameters:
tablesKey- tablesKey Type- Returns:
- Prefixes sent count
-
getPrefixesReceivedCount
Description copied from interface:BGPAfiSafiStatePrefixed received from the peer count.- Specified by:
getPrefixesReceivedCountin interfaceBGPAfiSafiState- Parameters:
tablesKey- tablesKey Type- Returns:
- Prefixed received count
-
getAfiSafisAdvertized
Description copied from interface:BGPAfiSafiStateList of TablesKey - Afi Safi Advertized to the neighbor.- Specified by:
getAfiSafisAdvertizedin interfaceBGPAfiSafiState- Returns:
- TableKeys
-
getAfiSafisReceived
Description copied from interface:BGPAfiSafiStateList of TablesKey - Afi Safi Advertized by neighbor.- Specified by:
getAfiSafisReceivedin interfaceBGPAfiSafiState- Returns:
- TableKeys
-
isGracefulRestartAdvertized
Description copied from interface:BGPGracelfulRestartStateis Graceful Restart Supported advertized to neighbor.- Specified by:
isGracefulRestartAdvertizedin interfaceBGPGracelfulRestartState- Parameters:
tablesKey- tables Key- Returns:
- true if Afi Safi was advertized to neighbor
-
isGracefulRestartReceived
Description copied from interface:BGPGracelfulRestartStateis Graceful Restart Supported advertized by neighbor.- Specified by:
isGracefulRestartReceivedin interfaceBGPGracelfulRestartState- Parameters:
tablesKey- tables Key- Returns:
- true if Afi Safi was advertized by neighbor
-
isLocalRestarting
public final boolean isLocalRestarting()Description copied from interface:BGPGracelfulRestartStateThis flag indicates whether the local neighbor is currently restarting.- Specified by:
isLocalRestartingin interfaceBGPGracelfulRestartState- Returns:
- local restarting state
-
getPeerRestartTime
public final int getPeerRestartTime()Description copied from interface:BGPGracelfulRestartStateThe period of time (advertised by the peer) that the peer expects a restart of a BGP session to take.- Specified by:
getPeerRestartTimein interfaceBGPGracelfulRestartState- Returns:
- time
-
isPeerRestarting
public final boolean isPeerRestarting()Description copied from interface:BGPGracelfulRestartStateThis flag indicates whether the remote neighbor is currently in the process of restarting, and hence received routes are currently stale.- Specified by:
isPeerRestartingin interfaceBGPGracelfulRestartState- Returns:
- peer is restarting
-
setAfiSafiGracefulRestartState
public final void setAfiSafiGracefulRestartState(int newPeerRestartTime, boolean newPeerRestarting, boolean newLocalRestarting) -
setAdvertizedGracefulRestartTableTypes
-
registerPrefixesSentCounter
protected final void registerPrefixesSentCounter(TablesKey tablesKey, PrefixesSentCounters prefixesSentCounter) -
registerPrefixesCounters
protected final void registerPrefixesCounters(@NonNull PrefixesReceivedCounters newPrefixesReceived, @NonNull PrefixesInstalledCounters newPrefixesInstalled) -
resetState
protected final void resetState() -
setRestartingState
protected final void setRestartingState() -
setLocalRestartingState
protected final void setLocalRestartingState(boolean restarting) -
getPeerState
Description copied from interface:BGPPeerStateProviderReturns Peer Operational State.- Specified by:
getPeerStatein interfaceBGPPeerStateProvider- Returns:
- BGP Peer State
-
getErroneousUpdateReceivedCount
public final long getErroneousUpdateReceivedCount()Description copied from interface:BGPErrorHandlingStateErroneous Update Received count.- Specified by:
getErroneousUpdateReceivedCountin interfaceBGPErrorHandlingState- Returns:
- count
-
getUpdateMessagesSentCount
public final long getUpdateMessagesSentCount()Description copied from interface:BGPPeerMessagesStateUpdate Messages Sent count.- Specified by:
getUpdateMessagesSentCountin interfaceBGPPeerMessagesState- Returns:
- count
-
getNotificationMessagesSentCount
public final long getNotificationMessagesSentCount()Description copied from interface:BGPPeerMessagesStateNotification Messages Sent count.- Specified by:
getNotificationMessagesSentCountin interfaceBGPPeerMessagesState- Returns:
- count
-
getUpdateMessagesReceivedCount
public final long getUpdateMessagesReceivedCount()Description copied from interface:BGPPeerMessagesStateUpdate Messages Received count.- Specified by:
getUpdateMessagesReceivedCountin interfaceBGPPeerMessagesState- Returns:
- count
-
getNotificationMessagesReceivedCount
public final long getNotificationMessagesReceivedCount()Description copied from interface:BGPPeerMessagesStateNotification Update Messages Received count.- Specified by:
getNotificationMessagesReceivedCountin interfaceBGPPeerMessagesState- Returns:
- count
-
messageSent
public final void messageSent(org.opendaylight.yangtools.yang.binding.Notification<?> msg) Description copied from interface:BGPMessagesListenerFired when message is sent.- Specified by:
messageSentin interfaceBGPMessagesListener- Parameters:
msg- message
-
messageReceived
public final void messageReceived(org.opendaylight.yangtools.yang.binding.Notification<?> msg) Description copied from interface:BGPMessagesListenerFired when message is received.- Specified by:
messageReceivedin interfaceBGPMessagesListener- Parameters:
msg- message
-
isActive
public final boolean isActive()Description copied from interface:BGPPeerStateIndicates whether this instance is being actively managed and updated.- Specified by:
isActivein interfaceBGPPeerState- Returns:
- active
-
setActive
protected final void setActive(boolean active) -
getMode
Description copied from interface:BGPGracelfulRestartStateReturns operational mode of graceful restart. Result depends on advertising and receiving graceful restart capability to/from peer.- Specified by:
getModein interfaceBGPGracelfulRestartState- Returns:
- graceful restart operational mode
-
setAdvertizedLlGracefulRestartTableTypes
-
isLlGracefulRestartAdvertised
Description copied from interface:BGPLlGracelfulRestartStateis Long-lived Graceful Restart Support advertised to neighbor.- Specified by:
isLlGracefulRestartAdvertisedin interfaceBGPLlGracelfulRestartState- Parameters:
tablesKey- tables Key- Returns:
- true if Afi Safi was advertised to neighbor
-
isLlGracefulRestartReceived
Description copied from interface:BGPLlGracelfulRestartStateis Long-lived Graceful Restart Support advertised by neighbor.- Specified by:
isLlGracefulRestartReceivedin interfaceBGPLlGracelfulRestartState- Parameters:
tablesKey- tables Key- Returns:
- true if Afi Safi was advertised by neighbor
-
getLlGracefulRestartTimer
Description copied from interface:BGPLlGracelfulRestartStateIf table is both advertised and received return timer with lower value. If table is not advertised or received return zero.- Specified by:
getLlGracefulRestartTimerin interfaceBGPLlGracelfulRestartState- Parameters:
tablesKey- tables key- Returns:
- effective value of timer in seconds
-