public class NetworkUpdate
extends java.lang.Object
Constructor and Description |
---|
NetworkUpdate() |
Modifier and Type | Method and Description |
---|---|
void |
deleteLink(long linkId)
Deletes a link from the network
|
void |
deleteLink(long linkId, int enclosingPartitionId)
Deletes a link from the network
|
void |
deleteNode(long nodeId)
Deletes a node from the network
|
void |
deleteNode(long nodeId, int enclosingPartitionId)
Delete a node from the network.
|
long[] |
getDeletedLinkIds() |
long[] |
getDeletedNodeIds() |
LogicalLink |
getLink(long linkId) |
LogicalNode |
getNode(long nodeId) |
int |
getNodePartitionId(long nodeId)
Returns the partition ID the node is assigned to.
|
PartitionUpdate |
getPartitionUpdate(int partitionId)
Returns the update information of the specified partition.
|
int[] |
getUpdatedPartitionIds()
Returns the IDs of all the updated partitions.
|
boolean |
isLinkDeleted(long linkId) |
boolean |
isNodeDeleted(long nodeId) |
void |
setPartitionUpdate(int partitionId, PartitionUpdate partitionUpdate)
Sets the update information for the specified partition.
|
void |
updateLink(LogicalLink link, int enclosingPartitionId)
Adds or updates a link in the network
|
void |
updateNode(LogicalNode node, int enclosingPartitionId, int nodePartitionId)
Adds or updates a node in the network.
|
public int[] getUpdatedPartitionIds()
public PartitionUpdate getPartitionUpdate(int partitionId)
partitionId
- partition IDpublic void setPartitionUpdate(int partitionId, PartitionUpdate partitionUpdate)
partitionId
- partition IDpartitionUpdate
- partition update informationpublic void updateNode(LogicalNode node, int enclosingPartitionId, int nodePartitionId)
node
- node to be updatedenclosingPartitionId
- the network partition to update the node in. Note that, when the node is an external node in the enclosing partition, the enclosing partition ID is different from the partition ID the node is assigned to.nodePartitionId
- the partition ID the node is assigned topublic void deleteNode(long nodeId, int enclosingPartitionId)
nodeId
- ID of the node to be deletedenclosingPartitionId
- the network partition to delete the node from. Note that, when the node is an external node in the enclosing partition, the enclosing partition ID is different from the partition ID the node is assigned to.public void deleteNode(long nodeId)
nodeId
- ID of the node to be deletedpublic void updateLink(LogicalLink link, int enclosingPartitionId)
link
- link to be updatedenclosingPartitionId
- the network partition to update the link inpublic void deleteLink(long linkId, int enclosingPartitionId)
linkId
- ID of the link to be deletedenclosingPartitionId
- the network partition to delete the link frompublic void deleteLink(long linkId)
linkId
- ID of the link to be deletedpublic int getNodePartitionId(long nodeId)
nodeId
- node IDpublic LogicalNode getNode(long nodeId)
public LogicalLink getLink(long linkId)
public long[] getDeletedNodeIds()
public long[] getDeletedLinkIds()
public boolean isLinkDeleted(long linkId)
public boolean isNodeDeleted(long nodeId)