Class LogicalNetNodeImpl

  • All Implemented Interfaces:
    LogicalNetNode, LogicalNode

    public class LogicalNetNodeImpl
    extends java.lang.Object
    implements LogicalNetNode
    Default implementation of LogicalNetNode.
    Since:
    11gR1
    • Constructor Detail

      • LogicalNetNodeImpl

        public LogicalNetNodeImpl​(long id,
                                  int partitionId,
                                  int linkLevel,
                                  double cost,
                                  boolean isActive,
                                  int maxLinkLevel,
                                  int numInLinks,
                                  int numOutLinks,
                                  CategorizedUserData userData)
        Constructs a LogicalNetNode object.
        Parameters:
        id - ID of the node
        partitionId - the partition which the node belongs to
        linkLevel - link level of the partition
        cost - cost of the node
        isActive - whether the node is active
        maxLinkLevel - maximum link level
        numInLinks -
        numOutLinks -
        userData -
    • Method Detail

      • getLinkLevel

        public int getLinkLevel()
        Description copied from interface: LogicalNetNode
        Returns the link level of the containing partition.
        Specified by:
        getLinkLevel in interface LogicalNetNode
        Returns:
      • getNumberOfInLinks

        public int getNumberOfInLinks()
        Description copied from interface: LogicalNetNode
        Returns the number of incoming links.
        Specified by:
        getNumberOfInLinks in interface LogicalNetNode
        Returns:
        number of incoming links
      • getNumberOfOutLinks

        public int getNumberOfOutLinks()
        Description copied from interface: LogicalNetNode
        Returns the number of outgoing links.
        Specified by:
        getNumberOfOutLinks in interface LogicalNetNode
        Returns:
        number of outgoing links
      • getPreviousNodeIds

        public long[] getPreviousNodeIds​(boolean activeOnly)
        Description copied from interface: LogicalNetNode
        Returns the IDs of all the nodes with a direct link to this node.
        Specified by:
        getPreviousNodeIds in interface LogicalNetNode
        Returns:
        array of previous node IDs
      • getNextNodeIds

        public long[] getNextNodeIds​(boolean activeOnly)
        Description copied from interface: LogicalNetNode
        Returns the IDs of all the nodes with a direct link from this node.
        Specified by:
        getNextNodeIds in interface LogicalNetNode
        Returns:
        array of next node IDs
      • getAdjacentNodeIds

        public long[] getAdjacentNodeIds​(boolean activeOnly)
        Description copied from interface: LogicalNetNode
        Returns the IDs of all the nodes with a direct link to or from this node.
        Specified by:
        getAdjacentNodeIds in interface LogicalNetNode
        Returns:
        array of adjacent node IDs
      • removeInLink

        public void removeInLink​(long linkId)
        Description copied from interface: LogicalNetNode
        Removes the incoming link with the specified link ID.
        Specified by:
        removeInLink in interface LogicalNetNode
        Parameters:
        linkId - link ID
      • removeOutLink

        public void removeOutLink​(long linkId)
        Description copied from interface: LogicalNetNode
        Removes the outgoing link with the specified link ID.
        Specified by:
        removeOutLink in interface LogicalNetNode
        Parameters:
        linkId - link ID
      • isPartiallyLoaded

        public boolean isPartiallyLoaded()
        Use max link level as an indicator for whether a node is external. If the max link level is less than the minimum allowed number 1, then the node must be an external node that is partially loaded.
        Specified by:
        isPartiallyLoaded in interface LogicalNetNode
        Returns:
      • toStandAloneNode

        public LogicalNode toStandAloneNode()
        Description copied from interface: LogicalNetNode
        Returns a new instance of a standalone node, which has the same properties as this node.
        Specified by:
        toStandAloneNode in interface LogicalNetNode
        Returns:
        a standalone node
      • clone

        public java.lang.Object clone()
                               throws java.lang.CloneNotSupportedException
        Support cloneable
        Specified by:
        clone in interface LogicalNetNode
        Returns:
        cloned object
        Throws:
        java.lang.CloneNotSupportedException
      • isDummyExternalNode

        public boolean isDummyExternalNode()
        Description copied from interface: LogicalNetNode
        Returns true if the net node object is an external node and
        Specified by:
        isDummyExternalNode in interface LogicalNetNode
        Returns:
      • getCategorizedUserData

        public abstract CategorizedUserData getCategorizedUserData()
        Returns categorized user data.
        Returns:
      • setCategorizedUserData

        public abstract void setCategorizedUserData​(CategorizedUserData userData)
        Sets categorized user data.
        Parameters:
        userData -
      • getUserData

        public abstract UserData getUserData​(int category)
        Returns user data for the specified category.
        Returns:
      • setUserData

        public abstract void setUserData​(int category,
                                         UserData userData)
        Sets user data for the specified category.
        Parameters:
        userData -
      • getId

        public long getId()
        Description copied from interface: LogicalNode
        Returns the node ID
        Specified by:
        getId in interface LogicalNode
        Returns:
        node ID
      • getCost

        public double getCost()
        Description copied from interface: LogicalNode
        Returns the cost of this node.
        Specified by:
        getCost in interface LogicalNode
        Returns:
        node cost
      • setCost

        public void setCost​(double cost)
        Description copied from interface: LogicalNode
        Sets the cost of this node.
        Specified by:
        setCost in interface LogicalNode
        Parameters:
        cost - node cost
      • getMaxLinkLevel

        public int getMaxLinkLevel()
        Description copied from interface: LogicalNode
        Returns the maximum link level of the links incident to this node.
        Specified by:
        getMaxLinkLevel in interface LogicalNode
        Returns:
        the maximum link level of the links incident to this node
      • setMaxLinkLevel

        public void setMaxLinkLevel​(int maxLinkLevel)
        Description copied from interface: LogicalNode
        Sets the maximum link level of the links incident to this node.
        Specified by:
        setMaxLinkLevel in interface LogicalNode
        Parameters:
        maxLinkLevel - maximum link level of the links incident to this node
      • isActive

        public boolean isActive()
        Description copied from interface: LogicalNode
        Checks whether the node is active.
        Specified by:
        isActive in interface LogicalNode
        Returns:
        true if the node is active
      • setIsActive

        public void setIsActive​(boolean isActive)
        Description copied from interface: LogicalNode
        Sets whether this node is active.
        Specified by:
        setIsActive in interface LogicalNode
        Parameters:
        isActive - true if the node is active; false otherwise.
      • update

        public void update​(LogicalNode node)
        Description copied from interface: LogicalNode
        Copies the attributes of the input node to this node.
        Specified by:
        update in interface LogicalNode
        Parameters:
        node - node containing the attributes to copy from
      • getUserData

        public UserData getUserData​(int category)
      • setUserData

        public void setUserData​(int category,
                                UserData userData)