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
      • registerTrigger

        public boolean registerTrigger​(ConnectedVertexTrigger trigger,
                                       String key)
        Description copied from interface: ConnectedVertex
        Register a trigger that is executed when a problem occurs on the Connected Vertex.
        Specified by:
        registerTrigger in interface ConnectedVertex
        Parameters:
        trigger - Trigger to be registered
        key - A unique key as string e.g. NodeId+LspId
        Returns:
        True if registration is done, false otherwise
      • unRegisterTrigger

        public boolean unRegisterTrigger​(ConnectedVertexTrigger trigger,
                                         String key)
        Description copied from interface: ConnectedVertex
        Un-register a trigger that is already registered on the Connected Vertex.
        Specified by:
        unRegisterTrigger in interface ConnectedVertex
        Parameters:
        trigger - Trigger to be unregistered
        key - A unique key as string e.g. NodeId+LspId
        Returns:
        True if un-registration is done, false otherwise
      • 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