Class PathIdUtil

java.lang.Object
org.opendaylight.protocol.bgp.parser.spi.PathIdUtil

public final class PathIdUtil extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final PathId
     
    static final org.opendaylight.yangtools.yang.common.Uint32
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static PathId
    buildPathId(org.opendaylight.yangtools.yang.data.api.schema.DataContainerNode routesCont, org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier pathIdNii)
    Build Path Id.
    static org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates
    createNidKey(org.opendaylight.yangtools.yang.common.QName routeQName, org.opendaylight.yangtools.util.ImmutableOffsetMapTemplate<org.opendaylight.yangtools.yang.common.QName> routeKeyTemplate, Object routeKeyValue, Optional<org.opendaylight.yangtools.yang.data.api.schema.DataContainerChild> maybePathIdLeaf)
    Build Route Key for supporting mp.
    static org.opendaylight.yangtools.yang.common.Uint32
    extractPathId(org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode data, org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier pathNii)
    Extract PathId from route change received.
    static PathId
    readPathId(io.netty.buffer.ByteBuf buffer)
    Reads Path Identifier (4 bytes) from buffer.
    static void
    writePathId(PathId pathId, io.netty.buffer.ByteBuf buffer)
    Writes path-id value into the buffer when the path-id is not null or does not equal to zero.

    Methods inherited from class java.lang.Object

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

    • NON_PATH_ID_VALUE

      public static final org.opendaylight.yangtools.yang.common.Uint32 NON_PATH_ID_VALUE
    • NON_PATH_ID

      public static final PathId NON_PATH_ID
  • Method Details

    • writePathId

      public static void writePathId(PathId pathId, io.netty.buffer.ByteBuf buffer)
      Writes path-id value into the buffer when the path-id is not null or does not equal to zero.
      Parameters:
      pathId - The NLRI Path Identifier.
      buffer - The ByteBuf where path-id value can be written.
    • readPathId

      public static PathId readPathId(io.netty.buffer.ByteBuf buffer)
      Reads Path Identifier (4 bytes) from buffer.
      Parameters:
      buffer - Input buffer.
      Returns:
      Decoded PathId.
    • extractPathId

      public static org.opendaylight.yangtools.yang.common.Uint32 extractPathId(org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode data, org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier pathNii)
      Extract PathId from route change received.
      Parameters:
      data - Data containing the path Id
      pathNii - Path Id NodeIdentifier specific per each Rib support
      Returns:
      The path identifier from data change
    • buildPathId

      public static PathId buildPathId(org.opendaylight.yangtools.yang.data.api.schema.DataContainerNode routesCont, org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier pathIdNii)
      Build Path Id.
      Parameters:
      routesCont - route container
      pathIdNii - path Id node Identifier
      Returns:
      PathId or null in case is not the container
    • createNidKey

      public static org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates createNidKey(org.opendaylight.yangtools.yang.common.QName routeQName, org.opendaylight.yangtools.util.ImmutableOffsetMapTemplate<org.opendaylight.yangtools.yang.common.QName> routeKeyTemplate, Object routeKeyValue, Optional<org.opendaylight.yangtools.yang.data.api.schema.DataContainerChild> maybePathIdLeaf)
      Build Route Key for supporting mp. Key is composed by 2 elements (route-key + path Id).
      Parameters:
      routeQName - route QName
      routeKeyTemplate - route key template
      routeKeyValue - route key value
      maybePathIdLeaf - path id container, it might me supported or not, in that case default 0 value will be assigned
      Returns:
      Route Key Nid