Interface LogicalPartition

    • Method Detail

      • getPartitionId

        int getPartitionId()
        Returns the partition ID of this partition.
        Returns:
        partition ID of this partition
      • addNode

        void addNode​(LogicalNetNode node,
                     int partitionId)
        Adds a node to the network partition. The input partition ID can be the same as the partition ID of this network partition, in which case, the node to be added is an internal node; otherwise, the node is an external node, belong to a neighboring partition.
        Parameters:
        node - logical node
        partitionId - ID of the partition that the node belongs to
      • getNodePartitionId

        int getNodePartitionId​(long nodeId)
                        throws NodeNotFoundException
        Returns the ID of the partition that the input node belongs to.
        Parameters:
        nodeId - node ID
        Returns:
        partition ID
        Throws:
        NodeNotFoundException
      • setNodePartitionId

        void setNodePartitionId​(long nodeId,
                                int partitionId)
        Sets the partition the node belongs to.
        Parameters:
        nodeId - node ID
        partitionId - partition ID
      • getLinkPartitionIds

        int[] getLinkPartitionIds​(long linkId)
                           throws LinkNotFoundException
        Returns the ID of the partitions that the start and end nodes of the input link belongs to.
        Parameters:
        linkId - link ID
        Returns:
        partition IDs
        Throws:
        LinkNotFoundException