Class AbstractBestPathSelector

java.lang.Object
org.opendaylight.protocol.bgp.mode.spi.AbstractBestPathSelector
Direct Known Subclasses:
AddPathSelector

public class AbstractBestPathSelector extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected org.opendaylight.protocol.bgp.rib.spi.RouterId
     
    protected BestPathState
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected boolean
    Chooses best route according to BGP best path selection.
    protected org.opendaylight.protocol.bgp.rib.spi.RouterId
    replaceOriginator(org.opendaylight.protocol.bgp.rib.spi.RouterId routerId, org.opendaylight.yangtools.yang.data.api.schema.ContainerNode attrs)
    RFC 4456 mandates the use of Originator IDs instead of Router ID for selection purposes.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • bestOriginatorId

      protected org.opendaylight.protocol.bgp.rib.spi.RouterId bestOriginatorId
    • bestState

      protected BestPathState bestState
  • Constructor Details

    • AbstractBestPathSelector

      protected AbstractBestPathSelector(long ourAs)
  • Method Details

    • replaceOriginator

      protected org.opendaylight.protocol.bgp.rib.spi.RouterId replaceOriginator(org.opendaylight.protocol.bgp.rib.spi.RouterId routerId, org.opendaylight.yangtools.yang.data.api.schema.ContainerNode attrs)
      RFC 4456 mandates the use of Originator IDs instead of Router ID for selection purposes.
      Parameters:
      routerId - routerID
      attrs - router attributes
      Returns:
      returns originators Id if present otherwise routerId
    • isExistingPathBetter

      protected boolean isExistingPathBetter(@NonNull BestPathState state)
      Chooses best route according to BGP best path selection.
      Parameters:
      state - attributes of the new route
      Returns:
      true if the existing path is better, false if the new path is better