|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbe.ac.ulg.montefiore.run.totem.repository.CSPF.CSPF
public class CSPF
This class implements a Constraint Shortest Path First algorithm. This implementation supports equal cost multi path. This algorithm uses a priority queue to store the temporary node list under processing.
There is no specific parameter required by this routing algorithm.
Creation date: 1-Jan-2004
Field Summary | |
---|---|
protected java.util.Set<Link> |
avoidLinks
Links to avoid in the next CSPF computation |
Constructor Summary | |
---|---|
CSPF()
|
Method Summary | |
---|---|
protected java.util.HashMap<java.lang.String,CSPFElem> |
computeCSPF(Domain domain,
int priority,
Node srcNode,
Node dstNode,
float bw,
boolean stopToSourceOrDestination,
boolean computeFromSourceToDestination)
Computes the CSPF between a source node and a destination node with a bandwidth requirement |
java.util.List<Path> |
computeFullMeshSPF(Domain domain)
Computes a unique shortest path between all nodes in the topology |
java.util.List<Path> |
computeFullMeshSPF(Domain domain,
boolean ECMP)
Computes the shortest paths between all nodes in the topology |
java.util.List<Path> |
computeSPF(Domain domain,
boolean isSource,
java.lang.String node)
Computes a unique shortest path from (resp. |
java.util.List<Path> |
computeSPF(Domain domain,
boolean isSource,
java.lang.String node,
boolean ECMP)
Computes the shortest paths from (resp. |
java.util.List<Path> |
computeSPF(Domain domain,
java.lang.String src)
Computes a unique shortest path from a source node to all destination node |
java.util.List<Path> |
computeSPF(Domain domain,
java.lang.String src,
boolean ECMP)
Computes the shortest paths from a source node to all destination node |
Path |
computeSPF(Domain domain,
java.lang.String src,
java.lang.String dst)
Computes a unique shortest path between two nodes |
java.util.List<Path> |
computeSPF(Domain domain,
java.lang.String src,
java.lang.String dst,
boolean ECMP)
Computes the shortest path between two nodes. |
protected void |
displayPath(java.util.HashMap<java.lang.String,CSPFElem> path)
Debug method for displaying the Path |
protected void |
displayTent(CSPFPriorityQueue tent)
Debug method for displaying the TENT list |
boolean |
equals(java.lang.Object o)
|
protected java.util.List<Path> |
extractPath(Domain domain,
java.util.HashMap<java.lang.String,CSPFElem> path,
Node node,
boolean ECMP,
boolean computeFromSourceToDestination)
|
protected java.util.List<Path> |
extractPath(Domain domain,
java.util.HashMap<java.lang.String,CSPFElem> path,
Node srcNode,
Node dstNode,
boolean ECMP,
boolean computeFromSourceToDestination)
|
java.util.List<ParameterDescriptor> |
getBypassRoutingParameters()
Returns a list of available algorithm specfic parameters that can be passed to the routeBypass method. |
java.util.List<ParameterDescriptor> |
getDetourRoutingParameters()
Returns a list of available algorithm specfic parameters that can be passed to the routeDetour method. |
protected float |
getMetric(Link link)
|
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 |
int |
hashCode()
|
protected void |
initComputation(Domain domain)
|
protected void |
relax(Link link,
int priority,
boolean computeFromSourceToDestination)
|
TotemActionList |
routeBypass(Domain domain,
LSPBypassRoutingParameter param)
Computes a bypass based on the specified parameters. |
TotemActionList |
routeDetour(Domain domain,
LSPDetourRoutingParameter param)
Computes a detour backup for a LSP. |
TotemActionList |
routeLSP(Domain domain,
LSPPrimaryRoutingParameter param)
Computes a path for a LSP |
TotemActionList |
routeNLSP(Domain domain,
java.util.List<LSPPrimaryRoutingParameter> param)
Computes paths for a list of LSPs specified by a list of LSPPrimaryRoutingParameter |
void |
start()
|
void |
start(java.util.HashMap params)
Nothing to do |
void |
stop()
Nothing to do |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.Set<Link> avoidLinks
Constructor Detail |
---|
public CSPF()
Method Detail |
---|
protected void initComputation(Domain domain)
public TotemActionList routeLSP(Domain domain, LSPPrimaryRoutingParameter param) throws RoutingException, NoRouteToHostException
LSPPrimaryRouting
routeLSP
in interface LSPPrimaryRouting
RoutingException
NoRouteToHostException
public TotemActionList routeNLSP(Domain domain, java.util.List<LSPPrimaryRoutingParameter> param) throws RoutingException, NoRouteToHostException
LSPPrimaryRouting
routeNLSP
in interface LSPPrimaryRouting
param
- a list of LSPPrimaryRoutingParameter
RoutingException
NoRouteToHostException
public Path computeSPF(Domain domain, java.lang.String src, java.lang.String dst) throws RoutingException, NoRouteToHostException
SPF
computeSPF
in interface SPF
src
- the source nodedst
- the destination node
RoutingException
NoRouteToHostException
public java.util.List<Path> computeSPF(Domain domain, java.lang.String src, java.lang.String dst, boolean ECMP) throws RoutingException, NoRouteToHostException
SPF
computeSPF
in interface SPF
src
- the source nodedst
- the destination nodeECMP
- true if multipath activated
RoutingException
NoRouteToHostException
public java.util.List<Path> computeSPF(Domain domain, java.lang.String src) throws RoutingException, NoRouteToHostException
SPF
computeSPF
in interface SPF
src
- the source node
RoutingException
NoRouteToHostException
public java.util.List<Path> computeSPF(Domain domain, boolean isSource, java.lang.String node) throws RoutingException, NoRouteToHostException
SPF
isSource
. If
isSource
is true
, node
is considered
as the source node and the method computes a shortest path from this node
to all the other nodes.
computeSPF
in interface SPF
domain
- The domain on which the paths have to be computed.isSource
- true
if node
is the source and false
otherwise.node
- The source or destination node.
node
.
RoutingException
NoRouteToHostException
public java.util.List<Path> computeSPF(Domain domain, java.lang.String src, boolean ECMP) throws RoutingException, NoRouteToHostException
SPF
computeSPF
in interface SPF
src
- the source nodeECMP
- true
if multipath is activated
RoutingException
NoRouteToHostException
public java.util.List<Path> computeSPF(Domain domain, boolean isSource, java.lang.String node, boolean ECMP) throws RoutingException, NoRouteToHostException
SPF
isSource
. If
isSource
is true
, node
is considered
as the source node and the method computes a shortest path from this node
to all the other nodes.
computeSPF
in interface SPF
domain
- The domain on which the paths have to be computed.isSource
- true
if node
is the source and false
otherwise.node
- The source or destination node.ECMP
- true
if multipath is activated
node
.
RoutingException
NoRouteToHostException
public java.util.List<Path> computeFullMeshSPF(Domain domain) throws RoutingException, NoRouteToHostException
SPF
computeFullMeshSPF
in interface SPF
RoutingException
NoRouteToHostException
public java.util.List<Path> computeFullMeshSPF(Domain domain, boolean ECMP) throws RoutingException, NoRouteToHostException
SPF
computeFullMeshSPF
in interface SPF
ECMP
- true
if multipath is activated
RoutingException
NoRouteToHostException
protected float getMetric(Link link)
protected java.util.HashMap<java.lang.String,CSPFElem> computeCSPF(Domain domain, int priority, Node srcNode, Node dstNode, float bw, boolean stopToSourceOrDestination, boolean computeFromSourceToDestination) throws RoutingException, NoRouteToHostException, NodeNotFoundException
srcNode
- the source nodedstNode
- the destination nodebw
- the bandwidth demand
RoutingException
NoRouteToHostException
NodeNotFoundException
protected void relax(Link link, int priority, boolean computeFromSourceToDestination) throws NodeNotFoundException
NodeNotFoundException
protected java.util.List<Path> extractPath(Domain domain, java.util.HashMap<java.lang.String,CSPFElem> path, Node srcNode, Node dstNode, boolean ECMP, boolean computeFromSourceToDestination) throws RoutingException, NodeNotFoundException, NoRouteToHostException
RoutingException
NodeNotFoundException
NoRouteToHostException
protected java.util.List<Path> extractPath(Domain domain, java.util.HashMap<java.lang.String,CSPFElem> path, Node node, boolean ECMP, boolean computeFromSourceToDestination) throws RoutingException, NodeNotFoundException, NoRouteToHostException
RoutingException
NodeNotFoundException
NoRouteToHostException
public void start()
public void start(java.util.HashMap params)
start
in interface TotemAlgorithm
public void stop()
stop
in interface TotemAlgorithm
protected void displayTent(CSPFPriorityQueue tent)
tent
- protected void displayPath(java.util.HashMap<java.lang.String,CSPFElem> path)
path
- public java.util.List<ParameterDescriptor> getStartAlgoParameters()
TotemAlgorithm
getStartAlgoParameters
in interface TotemAlgorithm
public java.util.HashMap getRunningParameters()
TotemAlgorithm
getRunningParameters
in interface TotemAlgorithm
public java.util.List<ParameterDescriptor> getPrimaryRoutingParameters()
getPrimaryRoutingParameters
in interface LSPPrimaryRouting
public java.util.List<ParameterDescriptor> getDetourRoutingParameters()
LSPDetourRouting
getDetourRoutingParameters
in interface LSPDetourRouting
public boolean equals(java.lang.Object o)
equals
in interface SPF
equals
in class java.lang.Object
public int hashCode()
hashCode
in interface SPF
hashCode
in class java.lang.Object
public TotemActionList routeBypass(Domain domain, LSPBypassRoutingParameter param) throws RoutingException, NoRouteToHostException
routeBypass
in interface LSPBypassRouting
param
- specifies the parameters for the backup routing algorithm
RoutingException
NoRouteToHostException
public java.util.List<ParameterDescriptor> getBypassRoutingParameters()
LSPBypassRouting
getBypassRoutingParameters
in interface LSPBypassRouting
public TotemActionList routeDetour(Domain domain, LSPDetourRoutingParameter param) throws RoutingException, NoRouteToHostException
Domain.getReverseLink(be.ac.ulg.montefiore.run.totem.domain.model.Link)
to see how the reverse link is
chosen).
routeDetour
in interface LSPDetourRouting
domain
- param
- specifies the parameters for the backup routing algorithm
RoutingException
NoRouteToHostException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |