bcds.phison.ra
Class ProtectionAlgBase<V,E>

java.lang.Object
  extended by bcds.phison.ra.RoutingAlgBase<V,E>
      extended by bcds.phison.ra.ProtectionAlgBase<V,E>
Direct Known Subclasses:
ProtDPP_MinCost

public class ProtectionAlgBase<V,E>
extends RoutingAlgBase<V,E>

Provides common functions and data structures for protection-aware routing algorithms.

Author:
Juan Segovia S.

Constructor Summary
ProtectionAlgBase()
           
 
Method Summary
 void commitBackupPath(ConnectionInfo<V,E> cnx)
          Calls ted.updateResidualCap to decrease the available capacity along the (current) backup path.
 Path<V,E> getBackupPath()
          Returns the backup path found in the last call to run.
 boolean offersProtection()
          Returns true.
 void setup(TED<V,E> ted, Environ env)
          Initializes this object.
 void uncommitBackupPath(ConnectionInfo<V,E> cnx)
          Reversion of commitBackupPath(bcds.phison.ra.ConnectionInfo).
 
Methods inherited from class bcds.phison.ra.RoutingAlgBase
buildPathFromParentNodes, commitWorkingPath, dumpState, getCost, getEnviron, getEnvParams, getName, getTED, getWorkingPath, setBackupPath, setRequest, setWorkingPath, topologyHasChanged, uncommitWorkingPath
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProtectionAlgBase

public ProtectionAlgBase()
Method Detail

setup

public void setup(TED<V,E> ted,
                  Environ env)
Initializes this object. Calls the parent setup and makes sure that a subsequent call to getBackupPath returns null.

Overrides:
setup in class RoutingAlgBase<V,E>

offersProtection

public boolean offersProtection()
Returns true.

Overrides:
offersProtection in class RoutingAlgBase<V,E>

getBackupPath

public Path<V,E> getBackupPath()
Returns the backup path found in the last call to run.

Overrides:
getBackupPath in class RoutingAlgBase<V,E>

commitBackupPath

public void commitBackupPath(ConnectionInfo<V,E> cnx)
Calls ted.updateResidualCap to decrease the available capacity along the (current) backup path.

Overrides:
commitBackupPath in class RoutingAlgBase<V,E>

uncommitBackupPath

public void uncommitBackupPath(ConnectionInfo<V,E> cnx)
Reversion of commitBackupPath(bcds.phison.ra.ConnectionInfo).

Overrides:
uncommitBackupPath in class RoutingAlgBase<V,E>