be.ac.ulg.montefiore.run.totem.trafficMatrix.model.impl
Class SettableCosMPLSLoadData

java.lang.Object
  extended by be.ac.ulg.montefiore.run.totem.trafficMatrix.model.AbstractLoadData
      extended by be.ac.ulg.montefiore.run.totem.trafficMatrix.model.impl.SettableCosMPLSLoadData
All Implemented Interfaces:
CosLoadData, CosMPLSLoadData, LoadData, MPLSLoadData

public class SettableCosMPLSLoadData
extends AbstractLoadData
implements CosMPLSLoadData

Used to represent mpls load for different classes of service. With this class, the traffic dropped is always cosidered to be dropped at source node.

Creation date: 30/01/2008

Author:
Gaƫl Monfort (monfort@run.montefiore.ulg.ac.be)

Constructor Summary
SettableCosMPLSLoadData(Domain domain)
           
 
Method Summary
 void clear()
          Clear the data and rebuild data structures.
 double getDroppedTraffic()
          Gets the total dropped traffic.
 double getDroppedTraffic(Node node)
          Gets total traffic dropped at node node.
 double getDroppedTraffic(java.lang.String cos)
           
 double getDroppedTraffic(java.lang.String cos, Node node)
           
 TrafficMatrix getDroppedTrafficMatrix()
          Returns a new traffic matrix whose value for (src, dst) corresponds to the total dropped traffic when routing traffic from src to dst.
 TrafficMatrix getDroppedTrafficMatrix(Node node)
          Returns a new traffic matrix whose value for (src, dst) corresponds to the traffic dropped by node node when routing traffic from src to dst.
 TrafficMatrix getDroppedTrafficMatrix(java.lang.String cos)
           
 TrafficMatrix getDroppedTrafficMatrix(java.lang.String cos, Node node)
           
 double[] getLoad()
          Returns an newly created array that represent links load.
 double getLoad(Link lnk)
          Returns the load calculated for the given link or 0 if the link is not found.
 double[] getLoad(java.lang.String cos)
           
 double getLoad(java.lang.String cos, Link lnk)
           
 double[] getMPLSLoad()
          Same as LoadData.getLoad() but returns the only the mpls load (traffic that is routed on LSPs).
 double getMPLSLoad(Link link)
          Same as LoadData.getLoad(be.ac.ulg.montefiore.run.totem.domain.model.Link) but returns the only the mpls load (traffic that is routed on LSPs).
 double getMPLSLoad(Lsp lsp)
          Returns an newly created array that represent load on the lsp.
 double[] getMPLSLoad(java.lang.String cos)
           
 double getMPLSLoad(java.lang.String cos, Link l)
           
 double getMPLSLoad(java.lang.String cos, Lsp lsp)
           
 double[] getUtilization()
          Returns an newly created array that represent links utilisation (link load / link cpacity).
 double getUtilization(Link link)
          Returns the utilisation calculated for the given link or 0 if the link is not found.
 void setDroppedTraffic(java.lang.String cos, Node src, Node dst, double traffic)
          Set traffic dropped from flows between src and dst with class of service cos.
 void setTraffic(java.lang.String cos, Lsp lsp, double traffic)
          Sets the traffic on the lsp for the given cos.
 
Methods inherited from class be.ac.ulg.montefiore.run.totem.trafficMatrix.model.AbstractLoadData
addListener, notifyDataChange, removeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface be.ac.ulg.montefiore.run.totem.trafficMatrix.model.LoadData
addListener, notifyDataChange, removeListener
 
Methods inherited from interface be.ac.ulg.montefiore.run.totem.trafficMatrix.model.LoadData
addListener, notifyDataChange, removeListener
 

Constructor Detail

SettableCosMPLSLoadData

public SettableCosMPLSLoadData(Domain domain)
Method Detail

clear

public void clear()
Clear the data and rebuild data structures.


getMPLSLoad

public double getMPLSLoad(java.lang.String cos,
                          Lsp lsp)
Specified by:
getMPLSLoad in interface CosMPLSLoadData

getMPLSLoad

public double getMPLSLoad(java.lang.String cos,
                          Link l)
Specified by:
getMPLSLoad in interface CosMPLSLoadData

getMPLSLoad

public double[] getMPLSLoad(java.lang.String cos)
Specified by:
getMPLSLoad in interface CosMPLSLoadData

getMPLSLoad

public double getMPLSLoad(Link link)
Description copied from interface: MPLSLoadData
Same as LoadData.getLoad(be.ac.ulg.montefiore.run.totem.domain.model.Link) but returns the only the mpls load (traffic that is routed on LSPs).

Specified by:
getMPLSLoad in interface MPLSLoadData
Returns:

getMPLSLoad

public double getMPLSLoad(Lsp lsp)
Description copied from interface: MPLSLoadData
Returns an newly created array that represent load on the lsp. For each lsp lsp in the domain, the corresponding load is located at the index domain.getConvertor().getLspId(lsp.getId()) of the returned array. The load corresponds to the traffic routed on the working path (Lsp.getWorkingPath()) of the lsp at the moment of creation of the data. It is to the user to ensure that the working path hasn't changed since.

Specified by:
getMPLSLoad in interface MPLSLoadData
Returns:
links load for all links in the domain.

getMPLSLoad

public double[] getMPLSLoad()
Description copied from interface: MPLSLoadData
Same as LoadData.getLoad() but returns the only the mpls load (traffic that is routed on LSPs).

Specified by:
getMPLSLoad in interface MPLSLoadData
Returns:

getLoad

public double[] getLoad()
Description copied from interface: LoadData
Returns an newly created array that represent links load. For each link lnkof class Link in the domain, the corresponding load is located at the index domain.getConvertor().getLinkId(lnk.getId()) of the returned array.

Specified by:
getLoad in interface LoadData
Returns:
links load for all links in the domain.

getLoad

public double getLoad(Link lnk)
Description copied from interface: LoadData
Returns the load calculated for the given link or 0 if the link is not found.

Specified by:
getLoad in interface LoadData
Returns:
Return the load calculated for the given link.

getUtilization

public double[] getUtilization()
Description copied from interface: LoadData
Returns an newly created array that represent links utilisation (link load / link cpacity). For each link lnkof class Link in the domain, the corresponding utilisation is located at the index domain.getConvertor().getLinkId(lnk.getId()) of the returned array.

Specified by:
getUtilization in interface LoadData
Returns:
links load for all links in the domain.

getUtilization

public double getUtilization(Link link)
Description copied from interface: LoadData
Returns the utilisation calculated for the given link or 0 if the link is not found.

Specified by:
getUtilization in interface LoadData
Returns:
Return the utilisation calculated for the given link.

getDroppedTrafficMatrix

public TrafficMatrix getDroppedTrafficMatrix(Node node)
Description copied from interface: LoadData
Returns a new traffic matrix whose value for (src, dst) corresponds to the traffic dropped by node node when routing traffic from src to dst.

Specified by:
getDroppedTrafficMatrix in interface LoadData
Returns:

getDroppedTrafficMatrix

public TrafficMatrix getDroppedTrafficMatrix()
Description copied from interface: LoadData
Returns a new traffic matrix whose value for (src, dst) corresponds to the total dropped traffic when routing traffic from src to dst.

Specified by:
getDroppedTrafficMatrix in interface LoadData
Returns:

getDroppedTraffic

public double getDroppedTraffic(Node node)
Description copied from interface: LoadData
Gets total traffic dropped at node node.

Specified by:
getDroppedTraffic in interface LoadData
Returns:

getDroppedTraffic

public double getDroppedTraffic()
Description copied from interface: LoadData
Gets the total dropped traffic.

Specified by:
getDroppedTraffic in interface LoadData
Returns:

getLoad

public double[] getLoad(java.lang.String cos)
Specified by:
getLoad in interface CosLoadData

getLoad

public double getLoad(java.lang.String cos,
                      Link lnk)
Specified by:
getLoad in interface CosLoadData

getDroppedTrafficMatrix

public TrafficMatrix getDroppedTrafficMatrix(java.lang.String cos,
                                             Node node)
Specified by:
getDroppedTrafficMatrix in interface CosLoadData

getDroppedTrafficMatrix

public TrafficMatrix getDroppedTrafficMatrix(java.lang.String cos)
Specified by:
getDroppedTrafficMatrix in interface CosLoadData

getDroppedTraffic

public double getDroppedTraffic(java.lang.String cos,
                                Node node)
Specified by:
getDroppedTraffic in interface CosLoadData

getDroppedTraffic

public double getDroppedTraffic(java.lang.String cos)
Specified by:
getDroppedTraffic in interface CosLoadData

setDroppedTraffic

public void setDroppedTraffic(java.lang.String cos,
                              Node src,
                              Node dst,
                              double traffic)
Set traffic dropped from flows between src and dst with class of service cos. The traffic dropped is always cosidered to be dropped at source node.

Parameters:
cos -
src -
dst -
traffic -

setTraffic

public void setTraffic(java.lang.String cos,
                       Lsp lsp,
                       double traffic)
Sets the traffic on the lsp for the given cos. The traffic is considered to be flowing on the lsp working path at the moment of the call.

Parameters:
cos -
lsp -
traffic -


Copyright © 2004-2007 Research Unit in Networking, All Rights Reserved.