Class ConnectedVertexImpl

  • All Implemented Interfaces:
    ConnectedVertex

    public class ConnectedVertexImpl
    extends Object
    implements ConnectedVertex
    This Class implements the Connected Vertex used by the Connected Graph for path computation algorithms.
    Author:
    Olivier Dugeon, Philippe Niger
    • Constructor Detail

      • ConnectedVertexImpl

        public ConnectedVertexImpl​(@NonNull Long key)
      • ConnectedVertexImpl

        public ConnectedVertexImpl​(@NonNull Vertex vertex)
    • Method Detail

      • setVertex

        public ConnectedVertexImpl setVertex​(Vertex vertex)
        Set associated Vertex to this Connected Vertex.
        Parameters:
        vertex - Vertex
      • disconnect

        public void disconnect()
        Disconnect all input and output Connected Edge.
      • addPrefix

        public ConnectedVertexImpl addPrefix​(Prefix prefix)
        Add Prefix to this Connected Vertex.
        Parameters:
        prefix - Prefix
      • removePrefix

        public void removePrefix​(Prefix prefix)
        Remove Prefix.
        Parameters:
        prefix - Prefix
      • getKey

        public Long getKey()
        Description copied from interface: ConnectedVertex
        Returns unique key associated to this Connected Vertex.
        Specified by:
        getKey in interface ConnectedVertex
        Returns:
        Vertex Key
      • getEdgeTo

        public List<ConnectedEdge> getEdgeTo​(Long dstRid)
        Description copied from interface: ConnectedVertex
        Returns Connected Edges that has for destination the Connected Vertex identified by its key.
        Specified by:
        getEdgeTo in interface ConnectedVertex
        Parameters:
        dstRid - Unique Key that identify the destination Vertex
        Returns:
        List of Connected Edge
      • getPrefixes

        public List<Prefix> getPrefixes()
        Description copied from interface: ConnectedVertex
        Return the list of prefix announced by this Connected Vertex. Prefix contains the associated SID when Segment Routing is enable.
        Specified by:
        getPrefixes in interface ConnectedVertex
        Returns:
        List of Prefix
      • toString

        public String toString()
        Return the name of the associated Vertex if set or the router-id otherwise.
        Overrides:
        toString in class Object
        Returns:
        Vertex name or router-id