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

All Known Subinterfaces:
LinkLoadStrategy
All Known Implementing Classes:
AbstractLinkLoadComputer, AbstractLinkLoadStrategy, BasicIGPShortcutStrategy, IGPShortcutStrategy, MultiCommodityFlow, OptDivideTMLoadComputer, OverlayStrategy, PureMPLSCosLinkLoadComputer, SPFLinkLoadStrategy

public interface LinkLoadComputer

The classes that implements LinkLoadComputer calculates the links load and utilization for a given domain, given some traffic matrices. The calculated data are in the form of a LoadData object. The LinkLoadComputer can listen to events (from the domain or from the traffic matrices) to maintain the correct state (up-to-date, outdated) of its data. The data can be updated by calling update() or recompute(). Some listeners can also be attached to the LinkLoadComputer, signaling a change in the validity of the data (returned by getData().

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 and stop listening to events.
 LoadData detachData()
          Returns the data used by the link load computer and do not use it internally any more.
 boolean equals(java.lang.Object o)
          returns true if the LinkLoadComputer uses the same parameters as the object o.
 LoadData getData()
          Returns a view of the data.
 Domain getDomain()
          Returns the domain associated.
 java.lang.String getShortName()
          Return a string representing the parameters in short.
 java.util.List<TrafficMatrix> getTrafficMatrices()
          TODO: maybe change this to a set Returns the traffic matrix.
 int hashCode()
           
 void invalidate()
          Call this method to signal the llc that its data are no more up-to-date
 boolean isUpToDate()
          Returns true if the internal data are up-to-date
 void recompute()
          Recomputes the load data.
 void removeListener(LinkLoadComputerListener listener)
          Remove a listener.
 void startListening()
          Start listening to changes to keep data up-to-date
 void stopListening()
          Stop listening to changes in the data
 void update()
          Updates the data if the data is outdated.
 

Method Detail

addListener

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

Parameters:
listener -

removeListener

void removeListener(LinkLoadComputerListener listener)
Remove a listener.

Parameters:
listener -

isUpToDate

boolean isUpToDate()
Returns true if the internal data are up-to-date

Returns:

recompute

void recompute()
Recomputes the load data.


update

void update()
Updates the data if the data is outdated.


invalidate

void invalidate()
Call this method to signal the llc that its data are no more up-to-date


getDomain

Domain getDomain()
Returns the domain associated.

Returns:

getTrafficMatrices

java.util.List<TrafficMatrix> getTrafficMatrices()
TODO: maybe change this to a set Returns the traffic matrix.

Returns:

destroy

void destroy()
Free resources associated with the object and stop listening to events.


startListening

void startListening()
Start listening to changes to keep data up-to-date


stopListening

void stopListening()
Stop listening to changes in the data


getShortName

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

Returns:

getData

LoadData getData()
Returns a view of the data. The returned data are still used internally.

Returns:

detachData

LoadData detachData()
Returns the data used by the link load computer and do not use it internally any more. After the data has been detached, the load has to be computed again by a call to recompute().

Returns:

equals

boolean equals(java.lang.Object o)
returns true if the LinkLoadComputer uses the same parameters as the object o. (the computed data at a given moment are equivalent)

Overrides:
equals in class java.lang.Object
Parameters:
o -
Returns:

hashCode

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


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