be.ac.ulg.montefiore.run.totem.trafficMatrix.model
Interface LinkLoadComputer

All Known Implementing Classes:
LinkLoadComputerImpl

public interface LinkLoadComputer

The classes that implements LinkLoadComputer calculates the links load and utilization of a given domain thanks to a LinkLoadStrategy and a traffic matrix.

Creation date: 10 mars 2006

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

Method Summary
 void addListener(LinkLoadComputerListener listener)
          Add a listener.
 void destroy()
          Free resources associated with the object.
 boolean equals(java.lang.Object o)
           
 Domain getDomain()
          Returns the domain associated.
 java.lang.String getId()
          Returns the id associated with the instance, if it has been set.
 double[] getLoad()
          Returns a vector that represent links load.
 double getLoad(Link lnk)
          Returns the load calculated for the given link.
 TmLoadComputer getLoadComputer()
          Returns the associated routing strategy.
 java.lang.String getShortName()
          Return a string representing the parameters in short.
 TrafficMatrix getTrafficMatrix()
          Returns the traffic matrix.
 double[] getUtilization()
          Returns a vector that represent links utilization.
 double getUtilization(Link lnk)
          Returns the utilization calculated for the given link.
 int hashCode()
           
 boolean isConsistent()
          return true if the object is consistent (not yet destroyed).
 boolean isSetId()
          returns true if the id has been set
 void removeListener(LinkLoadComputerListener listener)
          Remove a listener.
 void setId(java.lang.String id)
          Sets the id of the LinkLoadComputer
 void unsetId()
          unsets the id
 

Method Detail

addListener

void addListener(LinkLoadComputerListener listener)
Add a listener. Once added, the listener will be notified of changes in the calculatd load.

Parameters:
listener -

removeListener

void removeListener(LinkLoadComputerListener listener)
Remove a listener.

Parameters:
listener -

getId

java.lang.String getId()
                       throws LinkLoadComputerIdException
Returns the id associated with the instance, if it has been set.

Returns:
Throws:
LinkLoadComputerIdException - id the Id was not set

setId

void setId(java.lang.String id)
           throws LinkLoadComputerIdException
Sets the id of the LinkLoadComputer

Parameters:
id -
Throws:
LinkLoadComputerIdException - if the id was already set

isSetId

boolean isSetId()
returns true if the id has been set

Returns:

unsetId

void unsetId()
unsets the id


getLoad

double[] getLoad()
                 throws DataConsistencyException,
                        NoRouteToHostException,
                        RoutingException
Returns a vector that represent links load. For each link lnk of class Link in the domain, the corresponding load is located at the index domain.getConvertor().getLinkId(lnk.getId()) of the returned array.

Returns:
links load for all links in the domain.
Throws:
DataConsistencyException
NoRouteToHostException
RoutingException

getLoad

double getLoad(Link lnk)
               throws LinkNotFoundException,
                      DataConsistencyException,
                      NoRouteToHostException,
                      RoutingException
Returns the load calculated for the given link.

Parameters:
lnk -
Returns:
Return the load calculated for the given link.
Throws:
LinkNotFoundException
DataConsistencyException
NoRouteToHostException
RoutingException

getUtilization

double[] getUtilization()
                        throws DataConsistencyException,
                               NoRouteToHostException,
                               RoutingException
Returns a vector that represent links utilization. Utilization is defined as load divided by capacity. For each link lnk of class Link in the domain, the corresponding utilization is located at the index domain.getConvertor().getLinkId(lnk.getId()) of the returned array.

Returns:
links load for all links in the domain.
Throws:
DataConsistencyException
NoRouteToHostException
RoutingException

getUtilization

double getUtilization(Link lnk)
                      throws LinkNotFoundException,
                             DataConsistencyException,
                             NoRouteToHostException,
                             RoutingException
Returns the utilization calculated for the given link. Utilization is defined as load divided by capacity.

Parameters:
lnk -
Returns:
Return the load calculated for the given link.
Throws:
LinkNotFoundException
DataConsistencyException
NoRouteToHostException
RoutingException

getDomain

Domain getDomain()
Returns the domain associated.

Returns:

getLoadComputer

TmLoadComputer getLoadComputer()
Returns the associated routing strategy.

Returns:

getTrafficMatrix

TrafficMatrix getTrafficMatrix()
Returns the traffic matrix.

Returns:

destroy

void destroy()
Free resources associated with the object.


isConsistent

boolean isConsistent()
return true if the object is consistent (not yet destroyed).

Returns:

getShortName

java.lang.String getShortName()
Return a string representing the parameters in short.

Returns:

equals

boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

int hashCode()
Overrides:
hashCode in class java.lang.Object


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