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

java.lang.Object
  extended by be.ac.ulg.montefiore.run.totem.trafficMatrix.model.impl.LinkLoadStrategyAdapter
All Implemented Interfaces:
LinkLoadStrategy, TmLoadComputer
Direct Known Subclasses:
BasicIGPShortcutStrategy, IGPShortcutStrategy, OverlayStrategy, SPFLinkLoadStrategy

public abstract class LinkLoadStrategyAdapter
extends java.lang.Object
implements LinkLoadStrategy

This adapter can be used by link load strategy implementations to avoid property methods redefinition.

Creation date: 28-Jun-2005 18:00:25

Author:
Fabian Skivee (skivee@run.montefiore.ulg.ac.be)

Field Summary
protected  boolean ECMP
           
protected  boolean reuseComputedPath
           
protected  SPF spf
           
protected  boolean stopOnError
           
 
Constructor Summary
protected LinkLoadStrategyAdapter()
          Set the default property value : ECMP = false, stopOnError = true, spf = CSPF.
 
Method Summary
 boolean equals(java.lang.Object o)
           
 SPF getSPFAlgo()
          Get the SPF (Shortest Path First algorithm) property.
 int hashCode()
           
 boolean isECMP()
          Get the ECMP (Equal-Cost Multi-Path) property.
 boolean isReuseComputedPath()
          Get the reuseComputedPath property.
 boolean isStopOnError()
          Get the StopOnError property.
 void setECMP(boolean ECMP)
          Set the ECMP (Equal-Cost Multi-Path) property.
 void setReuseComputedPath(boolean reuseComputedPath)
          Set the reuseComputedPath property
 void setSPFAlgo(SPF spf)
          Set the SPF (Shortest Path First algorithm) property.
 void setStopOnError(boolean stopOnError)
          Set the StopOnError property.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface be.ac.ulg.montefiore.run.totem.trafficMatrix.model.TmLoadComputer
compute
 

Field Detail

ECMP

protected boolean ECMP

stopOnError

protected boolean stopOnError

spf

protected SPF spf

reuseComputedPath

protected boolean reuseComputedPath
Constructor Detail

LinkLoadStrategyAdapter

protected LinkLoadStrategyAdapter()
Set the default property value : ECMP = false, stopOnError = true, spf = CSPF.

Method Detail

isECMP

public boolean isECMP()
Get the ECMP (Equal-Cost Multi-Path) property.

By default : false

Specified by:
isECMP in interface LinkLoadStrategy
Returns:
true if equal-cost multi-path is activated and false otherwise

setECMP

public void setECMP(boolean ECMP)
Set the ECMP (Equal-Cost Multi-Path) property.

Specified by:
setECMP in interface LinkLoadStrategy
Parameters:
ECMP - true if equal-cost multi-path must be activated and false otherwise

isStopOnError

public boolean isStopOnError()
Get the StopOnError property. The property StopOnError is false if the computation must continue after a NoRouteToHostException or a RoutingException occurs and true otherwise.

By default : true.

Specified by:
isStopOnError in interface LinkLoadStrategy
Returns:
false if the computation must continue after a NoRouteToHostException or a RoutingException occurs and true otherwise.

setStopOnError

public void setStopOnError(boolean stopOnError)
Set the StopOnError property. The property StopOnError is false if the computation must continue after a NoRouteToHostException or a RoutingException occurs and true otherwise.

Specified by:
setStopOnError in interface LinkLoadStrategy
Parameters:
stopOnError - false if the computation must continue after a NoRouteToHostException or a RoutingException occurs and true otherwise

getSPFAlgo

public SPF getSPFAlgo()
Get the SPF (Shortest Path First algorithm) property. The SPF is the routing algorithm used to compute the link load.

By default : dijkstra SPF implemented by the class CSPF.

Specified by:
getSPFAlgo in interface LinkLoadStrategy
Returns:
the SPF

setSPFAlgo

public void setSPFAlgo(SPF spf)
Set the SPF (Shortest Path First algorithm) property. The SPF is the routing algorithm used to compute the link load.

Specified by:
setSPFAlgo in interface LinkLoadStrategy
Parameters:
spf - the SPF to use in the link load computation

isReuseComputedPath

public boolean isReuseComputedPath()
Get the reuseComputedPath property. This property is true if the linkLoadCompution must reuse the already computed path. This can be used to speed up the computation if the previous computed paths are already good. This must be used with care. By default : false;

Specified by:
isReuseComputedPath in interface LinkLoadStrategy
Returns:
true if the linkLoadCompution must reuse the already computed path and false otherwise

setReuseComputedPath

public void setReuseComputedPath(boolean reuseComputedPath)
Set the reuseComputedPath property

Specified by:
setReuseComputedPath in interface LinkLoadStrategy
Parameters:
reuseComputedPath - true if the linkLoadCompution must reuse the already computed path and false otherwise

equals

public boolean equals(java.lang.Object o)
Specified by:
equals in interface LinkLoadStrategy
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Specified by:
hashCode in interface LinkLoadStrategy
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Specified by:
toString in interface LinkLoadStrategy
Overrides:
toString in class java.lang.Object


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