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, InstanceReference<Rib>
Direct Known Subclasses:
ApplicationPeer, BGPPeer

  • 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,org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.routing.types.rev171204.Uint24> afiSafisLlGracefulAdvertized)
  • Method Details

    • getGroupId

      public final String getGroupId()
      Description copied from interface: BGPPeerState
      PeerGroup Id.
      Specified by:
      getGroupId in interface BGPPeerState
      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 interface BGPPeerState
      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 interface BGPPeerState
      Returns:
      Paths counter
    • getBGPPeerMessagesState

      public final BGPPeerMessagesState getBGPPeerMessagesState()
      Description copied from interface: BGPPeerState
      BGP Message Operational State.
      Specified by:
      getBGPPeerMessagesState in interface BGPPeerState
      Returns:
      BGPPeerMessagesState
    • getBGPGracelfulRestart

      public final BGPGracelfulRestartState getBGPGracelfulRestart()
      Description copied from interface: BGPPeerState
      BGP Operational GracelfulRestart State.
      Specified by:
      getBGPGracelfulRestart in interface BGPPeerState
      Returns:
      BGPGracelfulRestartState
    • isAfiSafiSupported

      public final boolean isAfiSafiSupported(TablesKey tablesKey)
      Description copied from interface: BGPAfiSafiState
      is AfiSafi Supported.
      Specified by:
      isAfiSafiSupported in interface BGPAfiSafiState
      Parameters:
      tablesKey - tables Key
      Returns:
      true if Afi Safi was advertized to and by the neighbor
    • getPrefixesInstalledCount

      public final long getPrefixesInstalledCount(TablesKey tablesKey)
      Description copied from interface: BGPAfiSafiState
      Prefixes installed per specific tablekey.
      Specified by:
      getPrefixesInstalledCount in interface BGPAfiSafiState
      Parameters:
      tablesKey - tables Key
      Returns:
      count
    • getPrefixesSentCount

      public final long getPrefixesSentCount(TablesKey tablesKey)
      Description copied from interface: BGPAfiSafiState
      Prefixed sent to the Peer count.
      Specified by:
      getPrefixesSentCount in interface BGPAfiSafiState
      Parameters:
      tablesKey - tablesKey Type
      Returns:
      Prefixes sent count
    • getPrefixesReceivedCount

      public final long getPrefixesReceivedCount(TablesKey tablesKey)
      Description copied from interface: BGPAfiSafiState
      Prefixed received from the peer count.
      Specified by:
      getPrefixesReceivedCount in interface BGPAfiSafiState
      Parameters:
      tablesKey - tablesKey Type
      Returns:
      Prefixed received count
    • getAfiSafisAdvertized

      public final Set<TablesKey> getAfiSafisAdvertized()
      Description copied from interface: BGPAfiSafiState
      List of TablesKey - Afi Safi Advertized to the neighbor.
      Specified by:
      getAfiSafisAdvertized in interface BGPAfiSafiState
      Returns:
      TableKeys
    • getAfiSafisReceived

      public final Set<TablesKey> getAfiSafisReceived()
      Description copied from interface: BGPAfiSafiState
      List of TablesKey - Afi Safi Advertized by neighbor.
      Specified by:
      getAfiSafisReceived in interface BGPAfiSafiState
      Returns:
      TableKeys
    • isGracefulRestartAdvertized

      public final boolean isGracefulRestartAdvertized(TablesKey tablesKey)
      Description copied from interface: BGPGracelfulRestartState
      is Graceful Restart Supported advertized to neighbor.
      Specified by:
      isGracefulRestartAdvertized in interface BGPGracelfulRestartState
      Parameters:
      tablesKey - tables Key
      Returns:
      true if Afi Safi was advertized to neighbor
    • isGracefulRestartReceived

      public final boolean isGracefulRestartReceived(TablesKey tablesKey)
      Description copied from interface: BGPGracelfulRestartState
      is Graceful Restart Supported advertized by neighbor.
      Specified by:
      isGracefulRestartReceived in interface BGPGracelfulRestartState
      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 interface BGPGracelfulRestartState
      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 interface BGPGracelfulRestartState
      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 interface BGPGracelfulRestartState
      Returns:
      peer is restarting
    • setAfiSafiGracefulRestartState

      public final void setAfiSafiGracefulRestartState(int newPeerRestartTime, boolean newPeerRestarting, boolean newLocalRestarting)
    • setAdvertizedGracefulRestartTableTypes

      protected final void setAdvertizedGracefulRestartTableTypes(List<TablesKey> receivedGraceful)
    • 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)
    • getErroneousUpdateReceivedCount

      public final long getErroneousUpdateReceivedCount()
      Description copied from interface: BGPErrorHandlingState
      Erroneous Update Received count.
      Specified by:
      getErroneousUpdateReceivedCount in interface BGPErrorHandlingState
      Returns:
      count
    • getUpdateMessagesSentCount

      public final long getUpdateMessagesSentCount()
      Description copied from interface: BGPPeerMessagesState
      Update Messages Sent count.
      Specified by:
      getUpdateMessagesSentCount in interface BGPPeerMessagesState
      Returns:
      count
    • getNotificationMessagesSentCount

      public final long getNotificationMessagesSentCount()
      Description copied from interface: BGPPeerMessagesState
      Notification Messages Sent count.
      Specified by:
      getNotificationMessagesSentCount in interface BGPPeerMessagesState
      Returns:
      count
    • getUpdateMessagesReceivedCount

      public final long getUpdateMessagesReceivedCount()
      Description copied from interface: BGPPeerMessagesState
      Update Messages Received count.
      Specified by:
      getUpdateMessagesReceivedCount in interface BGPPeerMessagesState
      Returns:
      count
    • getNotificationMessagesReceivedCount

      public final long getNotificationMessagesReceivedCount()
      Description copied from interface: BGPPeerMessagesState
      Notification Update Messages Received count.
      Specified by:
      getNotificationMessagesReceivedCount in interface BGPPeerMessagesState
      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 interface BGPMessagesListener
      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 interface BGPMessagesListener
      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 interface BGPPeerState
      Returns:
      active
    • setActive

      protected final void setActive(boolean active)
    • getMode

      public final BgpAfiSafiGracefulRestartState.Mode 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 interface BGPGracelfulRestartState
      Returns:
      graceful restart operational mode
    • setAdvertizedLlGracefulRestartTableTypes

      public final void setAdvertizedLlGracefulRestartTableTypes(Map<TablesKey,org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.routing.types.rev171204.Uint24> afiSafiReceived)
    • isLlGracefulRestartAdvertised

      public final boolean isLlGracefulRestartAdvertised(TablesKey tablesKey)
      Description copied from interface: BGPLlGracelfulRestartState
      is Long-lived Graceful Restart Support advertised to neighbor.
      Specified by:
      isLlGracefulRestartAdvertised in interface BGPLlGracelfulRestartState
      Parameters:
      tablesKey - tables Key
      Returns:
      true if Afi Safi was advertised to neighbor
    • isLlGracefulRestartReceived

      public final boolean isLlGracefulRestartReceived(TablesKey tablesKey)
      Description copied from interface: BGPLlGracelfulRestartState
      is Long-lived Graceful Restart Support advertised by neighbor.
      Specified by:
      isLlGracefulRestartReceived in interface BGPLlGracelfulRestartState
      Parameters:
      tablesKey - tables Key
      Returns:
      true if Afi Safi was advertised by neighbor
    • getLlGracefulRestartTimer

      public final int getLlGracefulRestartTimer(TablesKey tablesKey)
      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 interface BGPLlGracelfulRestartState
      Parameters:
      tablesKey - tables key
      Returns:
      effective value of timer in seconds