public class SimAction
extends Object
Provides a set of actions to be notified by event handlers. These actions are:
Although the SimAction
class is common for all actions, its meaning (i.e.
action type) depends on the static method used to get an instance. Basically, the action
type is obtained through the getActionType()
method, and then
associated data can be retrieved from the get()
methods corresponding to that action,
for example getDemandAdded_xxx()
for a DEMAND_ADDED
action. Users are encouraged
to take a look on the description of the static methods to obtain more information.
Important: Since Net2Plan 0.3.0, actions are assumed to be already applied by the algorithms to the network design. This class is used to notify actions between simulation modules (i.e. event generator and event processor).
Modifier and Type | Class and Description |
---|---|
static class |
SimAction.ActionType
Type of action.
|
static class |
SimAction.Factory
Factory methods to create actions.
|
Modifier and Type | Method and Description |
---|---|
SimAction.ActionType |
getActionType()
Returns the action type.
|
long |
getDemandAdded_demandId()
Returns the demand identifier associated to a
DEMAND_ADDED action. |
long |
getDemandAdded_layerId()
Returns the layer identifier associated to a
DEMAND_ADDED action. |
long |
getDemandModified_demandId()
Returns the demand identifier associated to a
DEMAND_MODIFIED action. |
long |
getDemandModified_layerId()
Returns the layer identifier associated to a
DEMAND_MODIFIED action. |
Map<String,String> |
getDemandRemoved_attributes()
Returns the demand attributes associated to a
DEMAND_REMOVED action. |
long |
getDemandRemoved_demandId()
Returns the demand identifier associated to a
DEMAND_REMOVED action. |
long |
getDemandRemoved_egressNodeId()
Returns the egress node identifier associated to a
DEMAND_REMOVED action. |
long |
getDemandRemoved_ingressNodeId()
Returns the ingress node identifier associated to a
DEMAND_REMOVED action. |
long |
getDemandRemoved_layerId()
Returns the layer identifier associated to a
DEMAND_REMOVED action. |
double |
getDemandRemoved_offeredTraffic()
Returns the offered traffic associated to a
DEMAND_REMOVED action. |
Pair<Long,Long> |
getForwardingRuleAdded_demandLinkPair()
Returns the demand and outgoing link identifiers associated to a
FORWARDING_RULE_ADDED action. |
long |
getForwardingRuleAdded_layerId()
Returns the layer identifier associated to a
FORWARDING_RULE_ADDED action. |
Pair<Long,Long> |
getForwardingRuleModified_demandLinkPair()
Returns the demand and outgoing link identifiers associated to a
FORWARDING_RULE_MODIFIED action. |
long |
getForwardingRuleModified_layerId()
Returns the layer identifier associated to a
FORWARDING_RULE_MODIFIED action. |
Map<String,String> |
getForwardingRuleRemoved_attributes()
Returns the attributes associated to a
FORWARDING_RULE_REMOVED action. |
Pair<Long,Long> |
getForwardingRuleRemoved_demandLinkPair()
Returns the demand and outgoing link identifiers associated to a
FORWARDING_RULE_REMOVED action. |
long |
getForwardingRuleRemoved_layerId()
Returns the layer identifier associated to a
FORWARDING_RULE_REMOVED action. |
double |
getForwardingRuleRemoved_splittingRatio()
Returns the splitting ratio associated to a
FORWARDING_RULE_REMOVED action. |
long |
getLayerAdded_layerId()
Returns the layer identifier associated to a
LAYER_ADDED action. |
long |
getLayerModified_layerId()
Returns the layer identifier associated to a
LAYER_MODIFIED action. |
Map<String,String> |
getLayerRemoved_attributes()
Returns the layer attributes associated to a
LAYER_REMOVED action. |
String |
getLayerRemoved_demandTrafficUnitsName()
Returns the demand traffic units name associated to a
LAYER_REMOVED action. |
String |
getLayerRemoved_description()
Returns the layer description associated to a
LAYER_REMOVED action. |
long |
getLayerRemoved_layerId()
Returns the layer identifier associated to a
LAYER_REMOVED action. |
String |
getLayerRemoved_linkCapacityUnitsName()
Returns the link capacity units name associated to a
LAYER_REMOVED action. |
String |
getLayerRemoved_name()
Returns the layer name associated to a
LAYER_REMOVED action. |
long |
getLinkAdded_layerId()
Returns the layer identifier associated to a
LINK_ADDED action. |
long |
getLinkAdded_linkId()
Returns the link identifier associated to a
LINK_ADDED action. |
long |
getLinkDown_layerId()
Returns the layer identifier associated to a
LINK_DOWN action. |
long |
getLinkDown_linkId()
Returns the link identifier associated to a
LINK_DOWN action. |
long |
getLinkModified_layerId()
Returns the layer identifier associated to a
LINK_MODIFIED action. |
long |
getLinkModified_linkId()
Returns the link identifier associated to a
LINK_MODIFIED action. |
Map<String,String> |
getLinkRemoved_attributes()
Returns the attributes associated to a
LINK_REMOVED action. |
double |
getLinkRemoved_capacity()
Returns the capacity associated to a
LINK_REMOVED action. |
long |
getLinkRemoved_destinationNodeId()
Returns the destination node identifier associated to a
LINK_REMOVED action. |
long |
getLinkRemoved_layerId()
Returns the layer identifier associated to a
LINK_REMOVED action. |
double |
getLinkRemoved_lengthInKm()
Returns the length in km associated to a
LINK_REMOVED action. |
long |
getLinkRemoved_linkId()
Returns the link identifier associated to a
LINK_REMOVED action. |
long |
getLinkRemoved_originNodeId()
Returns the origin node identifier associated to a
LINK_REMOVED action. |
double |
getLinkRemoved_propagationSpeedInKmPerSecond()
Returns the propagation speed in km per second associated to a
LINK_REMOVED action. |
long |
getLinkUp_layerId()
Returns the layer identifier associated to a
LINK_UP action. |
long |
getLinkUp_linkId()
Returns the link identifier associated to a
LINK_UP action. |
long |
getNodeAdded_nodeId()
Returns the node identifier associated to a
NODE_ADDED action. |
long |
getNodeDown_nodeId()
Returns the node identifier associated to a
NODE_DOWN action. |
long |
getNodeModified_nodeId()
Returns the node identifier associated to a
NODE_MODIFIED action. |
Map<String,String> |
getNodeRemoved_attributes()
Returns the attributes associated to a
NODE_REMOVED action. |
String |
getNodeRemoved_name()
Returns the name associated to a
NODE_REMOVED action. |
long |
getNodeRemoved_nodeId()
Returns the node identifier associated to a
NODE_REMOVED action. |
Point2D |
getNodeRemoved_xyPosition()
Returns the coordinates associated to a
NODE_REMOVED action. |
long |
getNodeUp_nodeId()
Returns the node identifier associated to a
NODE_UP action. |
long |
getProtectionSegmentAdded_layerId()
Returns the layer identifier associated to a
PROTECTION_SEGMENT_ADDED action. |
long |
getProtectionSegmentAdded_segmentId()
Returns the protection segment identifier associated to a
PROTECTION_SEGMENT_ADDED action. |
long |
getProtectionSegmentModified_layerId()
Returns the layer identifier associated to a
PROTECTION_SEGMENT_MODIFIED action. |
long |
getProtectionSegmentModified_segmentId()
Returns the protection segment identifier associated to a
PROTECTION_SEGMENT_MODIFIED action. |
Map<String,String> |
getProtectionSegmentRemoved_attributes()
Returns the attributes associated to a
PROTECTION_SEGMENT_REMOVED action. |
long |
getProtectionSegmentRemoved_destinationNodeId()
Returns the destination node identifier associated to a
PROTECTION_SEGMENT_REMOVED action. |
long |
getProtectionSegmentRemoved_layerId()
Returns the layer identifier associated to a
PROTECTION_SEGMENT_REMOVED action. |
long |
getProtectionSegmentRemoved_originNodeId()
Returns the origin node identifier associated to a
PROTECTION_SEGMENT_REMOVED action. |
double |
getProtectionSegmentRemoved_reservedCapacity()
Returns the reserved capacity associated to a
PROTECTION_SEGMENT_REMOVED action. |
long |
getProtectionSegmentRemoved_segmentId()
Returns the protection segment identifier associated to a
PROTECTION_SEGMENT_REMOVED action. |
List<Long> |
getProtectionSegmentRemoved_sequenceOfLinks()
Returns the sequence of links associated to a
PROTECTION_SEGMENT_REMOVED action. |
long |
getRouteAdded_layerId()
Returns the layer identifier associated to a
ROUTE_ADDED action. |
long |
getRouteAdded_routeId()
Returns the route identifier associated to a
ROUTE_ADDED action. |
long |
getRouteModified_layerId()
Returns the layer identifier associated to a
ROUTE_MODIFIED action. |
long |
getRouteModified_routeId()
Returns the route identifier associated to a
ROUTE_MODIFIED action. |
Map<String,String> |
getRouteRemoved_attributes()
Returns the attributes associated to a
ROUTE_REMOVED action. |
List<Long> |
getRouteRemoved_backupSegmentList()
Returns the backup segment list associated to a
ROUTE_REMOVED action. |
double |
getRouteRemoved_carriedTraffic()
Returns the carried traffic associated to a
ROUTE_REMOVED action. |
long |
getRouteRemoved_demandId()
Returns the demand identifier associated to a
ROUTE_REMOVED action. |
long |
getRouteRemoved_egressNodeId()
Returns the egress node identifier associated to a
ROUTE_REMOVED action. |
long |
getRouteRemoved_ingressNodeId()
Returns the ingress node identifier associated to a
ROUTE_REMOVED action. |
long |
getRouteRemoved_layerId()
Returns the layer identifier associated to a
ROUTE_REMOVED action. |
double |
getRouteRemoved_occupiedCapacity()
Returns the occupied capacity associated to a
ROUTE_REMOVED action. |
long |
getRouteRemoved_routeId()
Returns the route identifier associated to a
ROUTE_REMOVED action. |
List<Long> |
getRouteRemoved_sequenceOfLinks()
Returns the sequence of links associated to a
ROUTE_REMOVED action. |
long |
getSRGAdded_srgId()
Returns the SRG identifier associated to a
SRG_ADDED action. |
long |
getSRGModified_srgId()
Returns the SRG identifier associated to a
SRG_MODIFIED action. |
Map<String,String> |
getSRGRemoved_attributes()
Returns the attributes associated to a
SRG_REMOVED action. |
double |
getSRGRemoved_meanTimeToFailInHours()
Returns the mean time to fail associated to a
SRG_REMOVED action. |
double |
getSRGRemoved_meanTimeToRepairInHours()
Returns the mean time to repair associated to a
SRG_REMOVED action. |
long |
getSRGRemoved_srgId()
Returns the SRG identifier associated to a
SRG_REMOVED action. |
String |
toString()
Returns a
String representation of the object. |
public SimAction.ActionType getActionType()
public long getDemandAdded_demandId()
DEMAND_ADDED
action.public long getDemandAdded_layerId()
DEMAND_ADDED
action.public long getDemandModified_demandId()
DEMAND_MODIFIED
action.public long getDemandModified_layerId()
DEMAND_MODIFIED
action.public Map<String,String> getDemandRemoved_attributes()
DEMAND_REMOVED
action.public long getDemandRemoved_demandId()
DEMAND_REMOVED
action.public long getDemandRemoved_egressNodeId()
DEMAND_REMOVED
action.public long getDemandRemoved_ingressNodeId()
DEMAND_REMOVED
action.public long getDemandRemoved_layerId()
DEMAND_REMOVED
action.public double getDemandRemoved_offeredTraffic()
DEMAND_REMOVED
action.public Pair<Long,Long> getForwardingRuleAdded_demandLinkPair()
FORWARDING_RULE_ADDED
action.public long getForwardingRuleAdded_layerId()
FORWARDING_RULE_ADDED
action.public Pair<Long,Long> getForwardingRuleModified_demandLinkPair()
FORWARDING_RULE_MODIFIED
action.public long getForwardingRuleModified_layerId()
FORWARDING_RULE_MODIFIED
action.public Map<String,String> getForwardingRuleRemoved_attributes()
FORWARDING_RULE_REMOVED
action.public Pair<Long,Long> getForwardingRuleRemoved_demandLinkPair()
FORWARDING_RULE_REMOVED
action.public long getForwardingRuleRemoved_layerId()
FORWARDING_RULE_REMOVED
action.public double getForwardingRuleRemoved_splittingRatio()
FORWARDING_RULE_REMOVED
action.public long getLayerAdded_layerId()
LAYER_ADDED
action.public long getLayerModified_layerId()
LAYER_MODIFIED
action.public Map<String,String> getLayerRemoved_attributes()
LAYER_REMOVED
action.public String getLayerRemoved_demandTrafficUnitsName()
LAYER_REMOVED
action.public String getLayerRemoved_description()
LAYER_REMOVED
action.public long getLayerRemoved_layerId()
LAYER_REMOVED
action.public String getLayerRemoved_linkCapacityUnitsName()
LAYER_REMOVED
action.public String getLayerRemoved_name()
LAYER_REMOVED
action.public long getLinkAdded_layerId()
LINK_ADDED
action.public long getLinkAdded_linkId()
LINK_ADDED
action.public long getLinkDown_layerId()
LINK_DOWN
action.public long getLinkDown_linkId()
LINK_DOWN
action.public long getLinkModified_layerId()
LINK_MODIFIED
action.public long getLinkModified_linkId()
LINK_MODIFIED
action.public Map<String,String> getLinkRemoved_attributes()
LINK_REMOVED
action.public double getLinkRemoved_capacity()
LINK_REMOVED
action.public long getLinkRemoved_destinationNodeId()
LINK_REMOVED
action.public long getLinkRemoved_layerId()
LINK_REMOVED
action.public double getLinkRemoved_lengthInKm()
LINK_REMOVED
action.public long getLinkRemoved_linkId()
LINK_REMOVED
action.public long getLinkRemoved_originNodeId()
LINK_REMOVED
action.public double getLinkRemoved_propagationSpeedInKmPerSecond()
LINK_REMOVED
action.public long getLinkUp_layerId()
LINK_UP
action.public long getLinkUp_linkId()
LINK_UP
action.public long getNodeAdded_nodeId()
NODE_ADDED
action.public long getNodeDown_nodeId()
NODE_DOWN
action.public long getNodeModified_nodeId()
NODE_MODIFIED
action.public Map<String,String> getNodeRemoved_attributes()
NODE_REMOVED
action.public String getNodeRemoved_name()
NODE_REMOVED
action.public long getNodeRemoved_nodeId()
NODE_REMOVED
action.public Point2D getNodeRemoved_xyPosition()
NODE_REMOVED
action.public long getNodeUp_nodeId()
NODE_UP
action.public long getProtectionSegmentAdded_layerId()
PROTECTION_SEGMENT_ADDED
action.public long getProtectionSegmentAdded_segmentId()
PROTECTION_SEGMENT_ADDED
action.public long getProtectionSegmentModified_layerId()
PROTECTION_SEGMENT_MODIFIED
action.public long getProtectionSegmentModified_segmentId()
PROTECTION_SEGMENT_MODIFIED
action.public Map<String,String> getProtectionSegmentRemoved_attributes()
PROTECTION_SEGMENT_REMOVED
action.public long getProtectionSegmentRemoved_destinationNodeId()
PROTECTION_SEGMENT_REMOVED
action.public long getProtectionSegmentRemoved_layerId()
PROTECTION_SEGMENT_REMOVED
action.public long getProtectionSegmentRemoved_originNodeId()
PROTECTION_SEGMENT_REMOVED
action.public double getProtectionSegmentRemoved_reservedCapacity()
PROTECTION_SEGMENT_REMOVED
action.public long getProtectionSegmentRemoved_segmentId()
PROTECTION_SEGMENT_REMOVED
action.public List<Long> getProtectionSegmentRemoved_sequenceOfLinks()
PROTECTION_SEGMENT_REMOVED
action.public long getRouteAdded_layerId()
ROUTE_ADDED
action.public long getRouteAdded_routeId()
ROUTE_ADDED
action.public long getRouteModified_layerId()
ROUTE_MODIFIED
action.public long getRouteModified_routeId()
ROUTE_MODIFIED
action.public Map<String,String> getRouteRemoved_attributes()
ROUTE_REMOVED
action.public List<Long> getRouteRemoved_backupSegmentList()
ROUTE_REMOVED
action.public double getRouteRemoved_carriedTraffic()
ROUTE_REMOVED
action.public long getRouteRemoved_demandId()
ROUTE_REMOVED
action.public long getRouteRemoved_egressNodeId()
ROUTE_REMOVED
action.public long getRouteRemoved_ingressNodeId()
ROUTE_REMOVED
action.public long getRouteRemoved_layerId()
ROUTE_REMOVED
action.public double getRouteRemoved_occupiedCapacity()
ROUTE_REMOVED
action.public long getRouteRemoved_routeId()
ROUTE_REMOVED
action.public List<Long> getRouteRemoved_sequenceOfLinks()
ROUTE_REMOVED
action.public long getSRGAdded_srgId()
SRG_ADDED
action.public long getSRGModified_srgId()
SRG_MODIFIED
action.public Map<String,String> getSRGRemoved_attributes()
SRG_REMOVED
action.public double getSRGRemoved_meanTimeToFailInHours()
SRG_REMOVED
action.public double getSRGRemoved_meanTimeToRepairInHours()
SRG_REMOVED
action.public long getSRGRemoved_srgId()
SRG_REMOVED
action.public String toString()
String
representation of the object.toString
in class Object
String
representation of the object