public class Node extends NetworkElement
This class contains a representation of a node.
Modifier and Type | Method and Description |
---|---|
Set<MulticastTree> |
getAssociatedMulticastTrees(NetworkLayer... optionalLayerParameter)
Returns the set of multicast trees that start, end or traverse this node, in the given layer.
|
Set<ProtectionSegment> |
getAssociatedProtectionSegments(NetworkLayer... optionalLayerParameter)
Returns the set of protection segments that start, end or traverse this node, in the given layer.
|
Set<Route> |
getAssociatedRoutes(NetworkLayer... optionalLayerParameter)
Returns the set of routes that start, end or traverse this node, in the given layer.
|
double |
getEgressCarriedMulticastTraffic(NetworkLayer... optionalLayerParameter)
Returns the total current multicast carried traffic ending in the node, counting the multicast demands at the given layer.
|
double |
getEgressCarriedTraffic(NetworkLayer... optionalLayerParameter)
Returns the total current carried traffic ending in the node, counting the demands at the given layer.
|
double |
getEgressOfferedMulticastTraffic(NetworkLayer... optionalLayerParameter)
Returns the total multicast offered traffic ending in the node, counting the multicast demands at the given layer.
|
double |
getEgressOfferedTraffic(NetworkLayer... optionalLayerParameter)
Returns the total unicast offered traffic ending in the node, counting the demands at the given layer.
|
Map<Pair<Demand,Link>,Double> |
getForwardingRules(Demand demand)
Returns the set of forwarding rules of links initiated in the node and associated to the given demand (the links are then in the same layer
as the demand), that have a non-zero splitting factor
|
Map<Pair<Demand,Link>,Double> |
getForwardingRules(NetworkLayer... optionalLayerParameter)
Returns the set of forwarding rules of links initiated in the node of the given layer,
which have a non-zero splitting factor.
|
Set<Demand> |
getIncomingDemands(NetworkLayer... optionalLayerParameter)
Returns the set of demands ending in the node, in the given layer.
|
Set<Demand> |
getIncomingDemandsAllLayers()
Returns the set of demands ending in the node, in any layer.
|
Set<Link> |
getIncomingLinks(NetworkLayer... optionalLayerParameter)
Returns the set of links ending in the node, in the given layer.
|
Set<Link> |
getIncomingLinksAllLayers()
Returns the set of links ending in the node at any layer.
|
Set<MulticastDemand> |
getIncomingMulticastDemands(NetworkLayer... optionalLayerParameter)
Returns the set of multicast demands ending in the node, in the given layer.
|
Set<MulticastDemand> |
getIncomingMulticastDemandsAllLayers()
Returns the set of multicast demands ending in the node, in any layer.
|
Set<MulticastTree> |
getIncomingMulticastTrees(NetworkLayer... optionalLayerParameter)
Returns the set of multicast trees ending in the node, in the given layer.
|
Set<Route> |
getIncomingRoutes(NetworkLayer... optionalLayerParameter)
Returns the set of routes ending in the node, in the given layer.
|
double |
getIngressCarriedMulticastTraffic(NetworkLayer... optionalLayerParameter)
Returns the total current multicast carried traffic initiated in the node, counting the multicast demands at the given layer.
|
double |
getIngressCarriedTraffic(NetworkLayer... optionalLayerParameter)
Returns the total current carried traffic initiated in the node, counting the demands at the given layer.
|
double |
getIngressOfferedMulticastTraffic(NetworkLayer... optionalLayerParameter)
Returns the total multicast offered traffic initiated in the node, counting the multicast demands at the given layer.
|
double |
getIngressOfferedTraffic(NetworkLayer... optionalLayerParameter)
Returns the total unicast offered traffic initited in the node, counting the demands at the given layer.
|
Set<Node> |
getInNeighbors(NetworkLayer... optionalLayerParameter)
Returns the nodes directly connected to this, with links ending in this node at the given layer.
|
Set<Node> |
getInNeighborsAllLayers()
Returns the nodes directly connected to this, with links ending in this node at any layer.
|
String |
getName()
Returns the node name
|
Set<Demand> |
getOutgoingDemands(NetworkLayer... optionalLayerParameter)
Returns the set of demands initiated in the node, in the given layer.
|
Set<Demand> |
getOutgoingDemandsAllLayers()
Returns the set of demands initiated in the node, in any layer.
|
Set<Link> |
getOutgoingLinks(NetworkLayer... optionalLayerParameter)
Returns the set of links initiated in the node, in the given layer.
|
Set<Link> |
getOutgoingLinksAllLayers()
Returns the set of links initiated in the node in all layer.
|
Set<MulticastDemand> |
getOutgoingMulticastDemands(NetworkLayer... optionalLayerParameter)
Returns the set of multicast demands initiated in the node, in the given layer.
|
Set<MulticastDemand> |
getOutgoingMulticastDemandsAllLayers()
Returns the set of multicast demands initiated in the node, in any layer.
|
Set<MulticastTree> |
getOutgoingMulticastTrees(NetworkLayer... optionalLayerParameter)
Returns the set of multicast tree initiated in the node, in the given layer.
|
Set<Route> |
getOutgoingRoutes(NetworkLayer... optionalLayerParameter)
Returns the set of routes initiated in the node, in the given layer.
|
Set<Node> |
getOutNeighbors(NetworkLayer... optionalLayerParameter)
Returns the nodes directly connected to this, with links initiated in this node at the given layer.
|
Set<Node> |
getOutNeighborsAllLayers()
Returns the nodes directly connected to this, with links initiated in this node at any layer.
|
Set<SharedRiskGroup> |
getSRGs()
Returns the set of shared risk groups (SRGs) this node belongs to.
|
Point2D |
getXYPositionMap()
Returns node position in the map
|
boolean |
isDown()
Returns true if the node is down (failure state)
|
boolean |
isUp()
Returns true if the node is up (no failure state)
|
void |
remove()
Removes a node, and any associated link, demand, route, protection segment or forwarding rule.
|
void |
removeAllForwardingRules(NetworkLayer... optionalLayerParameter)
Removes all forwarding rules associated to the node for a given layer (that is, of layer links outgoing from the node).
|
boolean |
setFailureState(boolean setAsUp)
Set the failure state of the node: up or down.
|
void |
setName(String name)
Sets the node name.
|
void |
setXYPositionMap(Point2D pos)
Sets the node position in the map, used for visualization
|
String |
toString()
Returns a
String representation of the node. |
checkAttachedToNetPlanObject, checkAttachedToNetPlanObject, equals, getAttribute, getAttributes, getId, getIndex, getNetPlan, removeAllAttributes, removeAttribute, setAttribute, setAttributeMap, wasRemoved
public Set<MulticastTree> getAssociatedMulticastTrees(NetworkLayer... optionalLayerParameter)
Returns the set of multicast trees that start, end or traverse this node, in the given layer. If no layer is provided, the default layer is assumed.
optionalLayerParameter
- Network layer (optionalpublic Set<ProtectionSegment> getAssociatedProtectionSegments(NetworkLayer... optionalLayerParameter)
Returns the set of protection segments that start, end or traverse this node, in the given layer. If no layer is provided, the default layer is assumed.
optionalLayerParameter
- Network layer (optional)public Set<Route> getAssociatedRoutes(NetworkLayer... optionalLayerParameter)
Returns the set of routes that start, end or traverse this node, in the given layer. If no layer is provided, the default layer is assumed.
optionalLayerParameter
- Network layer (optional)public double getEgressCarriedMulticastTraffic(NetworkLayer... optionalLayerParameter)
Returns the total current multicast carried traffic ending in the node, counting the multicast demands at the given layer. If no layer is provided, the default layer is assumed.
optionalLayerParameter
- Network layer (optional)public double getEgressCarriedTraffic(NetworkLayer... optionalLayerParameter)
Returns the total current carried traffic ending in the node, counting the demands at the given layer. If no layer is provided, the default layer is assumed.
optionalLayerParameter
- Network layer (optional)public double getEgressOfferedMulticastTraffic(NetworkLayer... optionalLayerParameter)
Returns the total multicast offered traffic ending in the node, counting the multicast demands at the given layer. If no layer is provided, the default layer is assumed.
optionalLayerParameter
- Network layer (optional)public double getEgressOfferedTraffic(NetworkLayer... optionalLayerParameter)
Returns the total unicast offered traffic ending in the node, counting the demands at the given layer. If no layer is provided, the default layer is assumed.
optionalLayerParameter
- Network layer (optional)public Map<Pair<Demand,Link>,Double> getForwardingRules(Demand demand)
Returns the set of forwarding rules of links initiated in the node and associated to the given demand (the links are then in the same layer as the demand), that have a non-zero splitting factor
demand
- The demandpublic Map<Pair<Demand,Link>,Double> getForwardingRules(NetworkLayer... optionalLayerParameter)
Returns the set of forwarding rules of links initiated in the node of the given layer, which have a non-zero splitting factor. If no layer is provided, the default layer is assumed.
optionalLayerParameter
- Network layer (optional)public Set<Demand> getIncomingDemands(NetworkLayer... optionalLayerParameter)
Returns the set of demands ending in the node, in the given layer. If no layer is provided, the default layer is assumed.
optionalLayerParameter
- Network layer (optional)public Set<Demand> getIncomingDemandsAllLayers()
Returns the set of demands ending in the node, in any layer.
public Set<Link> getIncomingLinks(NetworkLayer... optionalLayerParameter)
Returns the set of links ending in the node, in the given layer. If no layer is provided, the default layer is assumed.
optionalLayerParameter
- the layerpublic Set<Link> getIncomingLinksAllLayers()
Returns the set of links ending in the node at any layer.
public Set<MulticastDemand> getIncomingMulticastDemands(NetworkLayer... optionalLayerParameter)
Returns the set of multicast demands ending in the node, in the given layer. If no layer is provided, the default layer is assumed.
optionalLayerParameter
- Network layer (optional)public Set<MulticastDemand> getIncomingMulticastDemandsAllLayers()
Returns the set of multicast demands ending in the node, in any layer.
public Set<MulticastTree> getIncomingMulticastTrees(NetworkLayer... optionalLayerParameter)
Returns the set of multicast trees ending in the node, in the given layer. If no layer is provided, the default layer is assumed.
optionalLayerParameter
- Network layer (optional)public Set<Route> getIncomingRoutes(NetworkLayer... optionalLayerParameter)
Returns the set of routes ending in the node, in the given layer. If no layer is provided, the default layer is assumed.
optionalLayerParameter
- Network layerpublic double getIngressCarriedMulticastTraffic(NetworkLayer... optionalLayerParameter)
Returns the total current multicast carried traffic initiated in the node, counting the multicast demands at the given layer. If no layer is provided, the default layer is assumed.
optionalLayerParameter
- Network layer (optional)public double getIngressCarriedTraffic(NetworkLayer... optionalLayerParameter)
Returns the total current carried traffic initiated in the node, counting the demands at the given layer. If no layer is provided, the default layer is assumed
optionalLayerParameter
- Network layer (optional)public double getIngressOfferedMulticastTraffic(NetworkLayer... optionalLayerParameter)
Returns the total multicast offered traffic initiated in the node, counting the multicast demands at the given layer. If no layer is provided, the default layer is assumed.
optionalLayerParameter
- Network layer (optional)public double getIngressOfferedTraffic(NetworkLayer... optionalLayerParameter)
Returns the total unicast offered traffic initited in the node, counting the demands at the given layer. If no layer is provided, the default layer is assumed.
optionalLayerParameter
- Network layer (optional)public Set<Node> getInNeighbors(NetworkLayer... optionalLayerParameter)
Returns the nodes directly connected to this, with links ending in this node at the given layer. If no layer is provided, the default layer is assumed.
optionalLayerParameter
- Network layer (optional)public Set<Node> getInNeighborsAllLayers()
Returns the nodes directly connected to this, with links ending in this node at any layer.
public String getName()
Returns the node name
public Set<Demand> getOutgoingDemands(NetworkLayer... optionalLayerParameter)
Returns the set of demands initiated in the node, in the given layer. If no layer is provided, the default layer is assumed.
optionalLayerParameter
- Network layer (optional)public Set<Demand> getOutgoingDemandsAllLayers()
Returns the set of demands initiated in the node, in any layer.
public Set<Link> getOutgoingLinks(NetworkLayer... optionalLayerParameter)
Returns the set of links initiated in the node, in the given layer. If no layer is provided, the default layer is assumed.
optionalLayerParameter
- Network layer (optional)public Set<Link> getOutgoingLinksAllLayers()
Returns the set of links initiated in the node in all layer.
public Set<MulticastDemand> getOutgoingMulticastDemands(NetworkLayer... optionalLayerParameter)
Returns the set of multicast demands initiated in the node, in the given layer. If no layer is provided, the default layer is assumed.
optionalLayerParameter
- Network layer (optional)public Set<MulticastDemand> getOutgoingMulticastDemandsAllLayers()
Returns the set of multicast demands initiated in the node, in any layer.
public Set<MulticastTree> getOutgoingMulticastTrees(NetworkLayer... optionalLayerParameter)
Returns the set of multicast tree initiated in the node, in the given layer. If no layer is provided, the default layer is assumed.
optionalLayerParameter
- The layerpublic Set<Route> getOutgoingRoutes(NetworkLayer... optionalLayerParameter)
Returns the set of routes initiated in the node, in the given layer. If no layer is provided, the default layer is assumed.
optionalLayerParameter
- Network layer (optional)public Set<Node> getOutNeighbors(NetworkLayer... optionalLayerParameter)
Returns the nodes directly connected to this, with links initiated in this node at the given layer. If no layer is provided, the default layer is assumed
optionalLayerParameter
- Network layerpublic Set<Node> getOutNeighborsAllLayers()
Returns the nodes directly connected to this, with links initiated in this node at any layer.
public Set<SharedRiskGroup> getSRGs()
Returns the set of shared risk groups (SRGs) this node belongs to.
public Point2D getXYPositionMap()
Returns node position in the map
public boolean isDown()
Returns true if the node is down (failure state)
public boolean isUp()
Returns true if the node is up (no failure state)
public void remove()
Removes a node, and any associated link, demand, route, protection segment or forwarding rule.
public void removeAllForwardingRules(NetworkLayer... optionalLayerParameter)
Removes all forwarding rules associated to the node for a given layer (that is, of layer links outgoing from the node). If no layer is provided, the default layer is assumed.
optionalLayerParameter
- the layerpublic boolean setFailureState(boolean setAsUp)
Set the failure state of the node: up or down. Returns the previous failure state. The routing is automatically updated, making the traffic of the traversing routes and segments as zero, and the hop-by-hop routing is updated as if the forwarding rules of input and output links were zero
setAsUp
- The new failure state (true
up, false
down)public void setName(String name)
Sets the node name. It does not have to be unique among the network nodes
name
- New ndoe namepublic void setXYPositionMap(Point2D pos)
Sets the node position in the map, used for visualization
pos
- New node positionPoint2D
public String toString()
Returns a String
representation of the node.
toString
in class NetworkElement
String
representation of the node