nl.tudelft.repository.XAMCRA
Class XAMCRA

java.lang.Object
  extended by nl.tudelft.repository.XAMCRA.XAMCRA
All Implemented Interfaces:
DomainSyncAlgorithm, LSPPrimaryRouting, TotemAlgorithm

public class XAMCRA
extends java.lang.Object
implements LSPPrimaryRouting, DomainSyncAlgorithm

This class implements the integration of XAMCRA (TUDelft). It is mandatory to specify the QoS constraints used when starting the algorithm. By default, only one constraint is used : the bandwidth. It is possible to use up to three additionnal constraints : the delai, metric and TE metric. The boolean parameters useMetric, useTEMetric, useDelay are used to specify which QoS constraints are in use. When routing an LSP, the delay constraint must be given in an additionnal parameter called "DelayConstraint", the metric constraint must be given in an additionnal parameter called "MetricConstraint" and the TE metric constraint must be given in an additionnal parameter called "TEMetricConstraint". If not specified, these values are set to Double.MAX_VALUE so that this means no constraint...

Creation date : 28 nov. 2005 13:47:24

Author:
Simon Balon (balon@run.montefiore.ulg.ac.be)

Field Summary
static int SAMCRA
           
static int TAMCRA
           
 
Constructor Summary
XAMCRA()
           
 
Method Summary
 void addLSP(Lsp lsp)
          Adds an LSP to XAMCRA database
 java.util.List<ParameterDescriptor> getPrimaryRoutingParameters()
           
 java.util.HashMap getRunningParameters()
          Returns the parameters given when the algorithm was started
 java.util.List<ParameterDescriptor> getStartAlgoParameters()
          Returns the optional parameters that can be given when starting the algorithm
 void invalidateDB()
          Tells the algo that the database is not up-to-date
 boolean isDBValid()
          return true if the local DB is up-to-date
 void printDB()
          print XAMCRA internal DB to the standard output
 void restart()
          restarts the algorithm with the same parameters
 TotemActionList routeLSP(Domain dom, LSPPrimaryRoutingParameter param)
          Computes a path with XAMCRA for one demand from a source node to a destination node with a bandwidth requirement
 TotemActionList routeNLSP(Domain dom, java.util.List<LSPPrimaryRoutingParameter> param)
          Computes paths with XAMCRA for a list of demands.
 void start(java.util.HashMap params)
          Used to start and initialize the algorithm
 void stop()
          Cleans all Xamcra data structures
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SAMCRA

public static final int SAMCRA
See Also:
Constant Field Values

TAMCRA

public static final int TAMCRA
See Also:
Constant Field Values
Constructor Detail

XAMCRA

public XAMCRA()
Method Detail

start

public void start(java.util.HashMap params)
           throws AlgorithmInitialisationException
Description copied from interface: TotemAlgorithm
Used to start and initialize the algorithm

Specified by:
start in interface TotemAlgorithm
Throws:
AlgorithmInitialisationException

stop

public void stop()
Cleans all Xamcra data structures

Specified by:
stop in interface TotemAlgorithm

routeNLSP

public TotemActionList routeNLSP(Domain dom,
                                 java.util.List<LSPPrimaryRoutingParameter> param)
                          throws RoutingException,
                                 NoRouteToHostException,
                                 LocalDatabaseException
Computes paths with XAMCRA for a list of demands. This method just calls the routeLSP method for each demand.

Specified by:
routeNLSP in interface LSPPrimaryRouting
Parameters:
param - the list of the demand specified as a list of LSPPrimaryRoutingParameter
Returns:
a list of AddLspAction
Throws:
RoutingException
NoRouteToHostException
LocalDatabaseException

routeLSP

public TotemActionList routeLSP(Domain dom,
                                LSPPrimaryRoutingParameter param)
                         throws RoutingException,
                                NoRouteToHostException,
                                LocalDatabaseException
Computes a path with XAMCRA for one demand from a source node to a destination node with a bandwidth requirement

Specified by:
routeLSP in interface LSPPrimaryRouting
Parameters:
param - contains the source, destination, bandwidth, PL, OA, ...
Returns:
a list of actions
Throws:
RoutingException
NoRouteToHostException
LocalDatabaseException

addLSP

public void addLSP(Lsp lsp)
            throws RoutingException
Adds an LSP to XAMCRA database

Parameters:
lsp - the LSP to be added
Throws:
RoutingException

printDB

public void printDB()
print XAMCRA internal DB to the standard output


getStartAlgoParameters

public java.util.List<ParameterDescriptor> getStartAlgoParameters()
Description copied from interface: TotemAlgorithm
Returns the optional parameters that can be given when starting the algorithm

Specified by:
getStartAlgoParameters in interface TotemAlgorithm
Returns:
the list of algorithm parameters

getRunningParameters

public java.util.HashMap getRunningParameters()
Description copied from interface: TotemAlgorithm
Returns the parameters given when the algorithm was started

Specified by:
getRunningParameters in interface TotemAlgorithm
Returns:

getPrimaryRoutingParameters

public java.util.List<ParameterDescriptor> getPrimaryRoutingParameters()
Specified by:
getPrimaryRoutingParameters in interface LSPPrimaryRouting

isDBValid

public boolean isDBValid()
Description copied from interface: DomainSyncAlgorithm
return true if the local DB is up-to-date

Specified by:
isDBValid in interface DomainSyncAlgorithm
Returns:

invalidateDB

public void invalidateDB()
Description copied from interface: DomainSyncAlgorithm
Tells the algo that the database is not up-to-date

Specified by:
invalidateDB in interface DomainSyncAlgorithm

restart

public void restart()
Description copied from interface: DomainSyncAlgorithm
restarts the algorithm with the same parameters

Specified by:
restart in interface DomainSyncAlgorithm


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