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
ConstructorDescriptionBGPPeerStateImpl
(@NonNull org.opendaylight.yangtools.binding.DataObjectIdentifier.WithKey<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 BGPGracelfulRestartState
BGP Operational GracelfulRestart State.final BGPPeerMessagesState
BGP Message Operational State.final long
Erroneous Update Received count.final String
PeerGroup Id.final int
getLlGracefulRestartTimer
(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.IpAddressNoZone
Return Neighbor Key/Address.final long
Notification Update Messages Received count.final long
Notification Messages Sent count.final int
The period of time (advertised by the peer) that the peer expects a restart of a BGP session to take.final BGPPeerState
Returns Peer Operational State.final long
getPrefixesInstalledCount
(TablesKey tablesKey) Prefixes installed per specific tablekey.final long
getPrefixesReceivedCount
(TablesKey tablesKey) Prefixed received from the peer count.final long
getPrefixesSentCount
(TablesKey tablesKey) Prefixed sent to the Peer count.final long
Prefixes installed under Effective-Rib-In for a BGP neighbor.final long
Update Messages Received count.final long
Update Messages Sent count.final boolean
isActive()
Indicates whether this instance is being actively managed and updated.final boolean
isAfiSafiSupported
(TablesKey tablesKey) is AfiSafi Supported.final boolean
isGracefulRestartAdvertized
(TablesKey tablesKey) is Graceful Restart Supported advertized to neighbor.final boolean
isGracefulRestartReceived
(TablesKey tablesKey) is Graceful Restart Supported advertized by neighbor.final boolean
isLlGracefulRestartAdvertised
(TablesKey tablesKey) is Long-lived Graceful Restart Support advertised to neighbor.final boolean
isLlGracefulRestartReceived
(TablesKey tablesKey) is Long-lived Graceful Restart Support advertised by neighbor.final boolean
This flag indicates whether the local neighbor is currently restarting.final boolean
This flag indicates whether the remote neighbor is currently in the process of restarting, and hence received routes are currently stale.final void
messageReceived
(org.opendaylight.yangtools.binding.Notification<?> msg) Fired when message is received.final void
messageSent
(org.opendaylight.yangtools.binding.Notification<?> msg) Fired when message is sent.protected final void
registerPrefixesCounters
(@NonNull PrefixesReceivedCounters newPrefixesReceived, @NonNull PrefixesInstalledCounters newPrefixesInstalled) protected final void
registerPrefixesSentCounter
(TablesKey tablesKey, PrefixesSentCounters prefixesSentCounter) protected final void
protected final void
setActive
(boolean active) protected final void
setAdvertizedGracefulRestartTableTypes
(List<TablesKey> receivedGraceful) final void
setAdvertizedLlGracefulRestartTableTypes
(Map<TablesKey, Integer> afiSafiReceived) final void
setAfiSafiGracefulRestartState
(int newPeerRestartTime, boolean newPeerRestarting, boolean newLocalRestarting) protected final void
setLocalRestartingState
(boolean restarting) protected final void
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, toString, wait, wait, wait
Methods inherited from interface org.opendaylight.protocol.bgp.rib.spi.state.BGPPeerState
getBGPAfiSafiState, getBGPErrorHandlingState, getBGPSessionState, getBGPTimersState, getBGPTransportState, getTotalPathsCount
Methods inherited from interface org.opendaylight.protocol.bgp.rib.RibReference
getInstanceIdentifier
-
Constructor Details
-
BGPPeerStateImpl
public BGPPeerStateImpl(@NonNull org.opendaylight.yangtools.binding.DataObjectIdentifier.WithKey<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:BGPPeerState
PeerGroup Id.- Specified by:
getGroupId
in 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:BGPPeerState
Return Neighbor Key/Address.- Specified by:
getNeighborAddress
in interfaceBGPPeerState
- Returns:
- neighbor Address
-
getTotalPrefixes
public final long getTotalPrefixes()Description copied from interface:BGPPeerState
Prefixes installed under Effective-Rib-In for a BGP neighbor.- Specified by:
getTotalPrefixes
in interfaceBGPPeerState
- Returns:
- Paths counter
-
getBGPPeerMessagesState
Description copied from interface:BGPPeerState
BGP Message Operational State.- Specified by:
getBGPPeerMessagesState
in interfaceBGPPeerState
- Returns:
- BGPPeerMessagesState
-
getBGPGracelfulRestart
Description copied from interface:BGPPeerState
BGP Operational GracelfulRestart State.- Specified by:
getBGPGracelfulRestart
in interfaceBGPPeerState
- Returns:
- BGPGracelfulRestartState
-
isAfiSafiSupported
Description copied from interface:BGPAfiSafiState
is AfiSafi Supported.- Specified by:
isAfiSafiSupported
in interfaceBGPAfiSafiState
- Parameters:
tablesKey
- tables Key- Returns:
- true if Afi Safi was advertized to and by the neighbor
-
getPrefixesInstalledCount
Description copied from interface:BGPAfiSafiState
Prefixes installed per specific tablekey.- Specified by:
getPrefixesInstalledCount
in interfaceBGPAfiSafiState
- Parameters:
tablesKey
- tables Key- Returns:
- count
-
getPrefixesSentCount
Description copied from interface:BGPAfiSafiState
Prefixed sent to the Peer count.- Specified by:
getPrefixesSentCount
in interfaceBGPAfiSafiState
- Parameters:
tablesKey
- tablesKey Type- Returns:
- Prefixes sent count
-
getPrefixesReceivedCount
Description copied from interface:BGPAfiSafiState
Prefixed received from the peer count.- Specified by:
getPrefixesReceivedCount
in interfaceBGPAfiSafiState
- Parameters:
tablesKey
- tablesKey Type- Returns:
- Prefixed received count
-
getAfiSafisAdvertized
Description copied from interface:BGPAfiSafiState
List of TablesKey - Afi Safi Advertized to the neighbor.- Specified by:
getAfiSafisAdvertized
in interfaceBGPAfiSafiState
- Returns:
- TableKeys
-
getAfiSafisReceived
Description copied from interface:BGPAfiSafiState
List of TablesKey - Afi Safi Advertized by neighbor.- Specified by:
getAfiSafisReceived
in interfaceBGPAfiSafiState
- Returns:
- TableKeys
-
isGracefulRestartAdvertized
Description copied from interface:BGPGracelfulRestartState
is Graceful Restart Supported advertized to neighbor.- Specified by:
isGracefulRestartAdvertized
in interfaceBGPGracelfulRestartState
- Parameters:
tablesKey
- tables Key- Returns:
- true if Afi Safi was advertized to neighbor
-
isGracefulRestartReceived
Description copied from interface:BGPGracelfulRestartState
is Graceful Restart Supported advertized by neighbor.- Specified by:
isGracefulRestartReceived
in interfaceBGPGracelfulRestartState
- Parameters:
tablesKey
- tables Key- Returns:
- true if Afi Safi was advertized by neighbor
-
isLocalRestarting
public final boolean isLocalRestarting()Description copied from interface:BGPGracelfulRestartState
This flag indicates whether the local neighbor is currently restarting.- Specified by:
isLocalRestarting
in interfaceBGPGracelfulRestartState
- Returns:
- local restarting state
-
getPeerRestartTime
public final int getPeerRestartTime()Description copied from interface:BGPGracelfulRestartState
The period of time (advertised by the peer) that the peer expects a restart of a BGP session to take.- Specified by:
getPeerRestartTime
in interfaceBGPGracelfulRestartState
- Returns:
- time
-
isPeerRestarting
public final boolean isPeerRestarting()Description copied from interface:BGPGracelfulRestartState
This flag indicates whether the remote neighbor is currently in the process of restarting, and hence received routes are currently stale.- Specified by:
isPeerRestarting
in 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:BGPPeerStateProvider
Returns Peer Operational State.- Specified by:
getPeerState
in interfaceBGPPeerStateProvider
- Returns:
- BGP Peer State
-
getErroneousUpdateReceivedCount
public final long getErroneousUpdateReceivedCount()Description copied from interface:BGPErrorHandlingState
Erroneous Update Received count.- Specified by:
getErroneousUpdateReceivedCount
in interfaceBGPErrorHandlingState
- Returns:
- count
-
getUpdateMessagesSentCount
public final long getUpdateMessagesSentCount()Description copied from interface:BGPPeerMessagesState
Update Messages Sent count.- Specified by:
getUpdateMessagesSentCount
in interfaceBGPPeerMessagesState
- Returns:
- count
-
getNotificationMessagesSentCount
public final long getNotificationMessagesSentCount()Description copied from interface:BGPPeerMessagesState
Notification Messages Sent count.- Specified by:
getNotificationMessagesSentCount
in interfaceBGPPeerMessagesState
- Returns:
- count
-
getUpdateMessagesReceivedCount
public final long getUpdateMessagesReceivedCount()Description copied from interface:BGPPeerMessagesState
Update Messages Received count.- Specified by:
getUpdateMessagesReceivedCount
in interfaceBGPPeerMessagesState
- Returns:
- count
-
getNotificationMessagesReceivedCount
public final long getNotificationMessagesReceivedCount()Description copied from interface:BGPPeerMessagesState
Notification Update Messages Received count.- Specified by:
getNotificationMessagesReceivedCount
in interfaceBGPPeerMessagesState
- Returns:
- count
-
messageSent
public final void messageSent(org.opendaylight.yangtools.binding.Notification<?> msg) Description copied from interface:BGPMessagesListener
Fired when message is sent.- Specified by:
messageSent
in interfaceBGPMessagesListener
- Parameters:
msg
- message
-
messageReceived
public final void messageReceived(org.opendaylight.yangtools.binding.Notification<?> msg) Description copied from interface:BGPMessagesListener
Fired when message is received.- Specified by:
messageReceived
in interfaceBGPMessagesListener
- Parameters:
msg
- message
-
isActive
public final boolean isActive()Description copied from interface:BGPPeerState
Indicates whether this instance is being actively managed and updated.- Specified by:
isActive
in interfaceBGPPeerState
- Returns:
- active
-
setActive
protected final void setActive(boolean active) -
getMode
Description copied from interface:BGPGracelfulRestartState
Returns operational mode of graceful restart. Result depends on advertising and receiving graceful restart capability to/from peer.- Specified by:
getMode
in interfaceBGPGracelfulRestartState
- Returns:
- graceful restart operational mode
-
setAdvertizedLlGracefulRestartTableTypes
-
isLlGracefulRestartAdvertised
Description copied from interface:BGPLlGracelfulRestartState
is Long-lived Graceful Restart Support advertised to neighbor.- Specified by:
isLlGracefulRestartAdvertised
in interfaceBGPLlGracelfulRestartState
- Parameters:
tablesKey
- tables Key- Returns:
- true if Afi Safi was advertised to neighbor
-
isLlGracefulRestartReceived
Description copied from interface:BGPLlGracelfulRestartState
is Long-lived Graceful Restart Support advertised by neighbor.- Specified by:
isLlGracefulRestartReceived
in interfaceBGPLlGracelfulRestartState
- Parameters:
tablesKey
- tables Key- Returns:
- true if Afi Safi was advertised by neighbor
-
getLlGracefulRestartTimer
Description copied from interface:BGPLlGracelfulRestartState
If table is both advertised and received return timer with lower value. If table is not advertised or received return zero.- Specified by:
getLlGracefulRestartTimer
in interfaceBGPLlGracelfulRestartState
- Parameters:
tablesKey
- tables key- Returns:
- effective value of timer in seconds
-