be.ac.ulg.montefiore.run.totem.domain.model.impl
Class SPFCacheImpl

java.lang.Object
  extended by be.ac.ulg.montefiore.run.totem.domain.model.impl.SPFCacheImpl
All Implemented Interfaces:
SPFCache

public class SPFCacheImpl
extends java.lang.Object
implements SPFCache

The SPFCache is designed to improve the performance of SPF path computation. It's based on the assumption that path does not change except when a link metric change, a link status change, a link addition or a link remove. So it can improve the performance if multiple call to getPath are done without metric, status or links changes.

Creation date: 07-Jul-2005 15:09:25

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

Nested Class Summary
 
Nested classes/interfaces inherited from interface be.ac.ulg.montefiore.run.totem.domain.model.SPFCache
SPFCache.SPFCacheListener
 
Constructor Summary
SPFCacheImpl(Domain domain)
           
 
Method Summary
 void clear()
          Remove all the SPF path in the cache *
 void clearPath(Node src, Node dst)
          Remove the SPF path computed between source node an destination node from the cache This method must be used if the path have potentially changed.
 SPFCache.SPFCacheListener getListener()
          Get the domain listener of the cache
 Path getPath(Node src, Node dst)
          Get the SPF path between a source node and a destination node
 java.util.List<Path> getPath(Node src, Node dst, boolean ECMP)
          Get all the SPF path between a source node and a destination node if the ECMP is true and a single SPF otherwise
 java.util.List<Path> getPath(Node src, Node dst, boolean ECMP, boolean stopOnError)
          Get all the SPF path between a source node and a destination node if the ECMP is true and a single SPF otherwise
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SPFCacheImpl

public SPFCacheImpl(Domain domain)
Method Detail

getListener

public SPFCache.SPFCacheListener getListener()
Description copied from interface: SPFCache
Get the domain listener of the cache

Specified by:
getListener in interface SPFCache
Returns:
the domain listener of the cache

getPath

public Path getPath(Node src,
                    Node dst)
             throws NoRouteToHostException,
                    RoutingException
Get the SPF path between a source node and a destination node

Specified by:
getPath in interface SPFCache
Parameters:
src - the source node
dst - the destination node
Returns:
the SPF path
Throws:
NoRouteToHostException
RoutingException

getPath

public java.util.List<Path> getPath(Node src,
                                    Node dst,
                                    boolean ECMP)
                             throws NoRouteToHostException,
                                    RoutingException
Get all the SPF path between a source node and a destination node if the ECMP is true and a single SPF otherwise

Specified by:
getPath in interface SPFCache
Parameters:
src - the source node
dst - the destination node
ECMP - true if equal cost multiple path is activated and false otherwise
Returns:
a list of equal cost SPF
Throws:
NoRouteToHostException
RoutingException

getPath

public java.util.List<Path> getPath(Node src,
                                    Node dst,
                                    boolean ECMP,
                                    boolean stopOnError)
                             throws NoRouteToHostException,
                                    RoutingException
Description copied from interface: SPFCache
Get all the SPF path between a source node and a destination node if the ECMP is true and a single SPF otherwise

Specified by:
getPath in interface SPFCache
Parameters:
src - the source node
dst - the destination node
ECMP - true if equal cost multiple path is activated and false otherwise
Returns:
a list of equal cost SPF
Throws:
NoRouteToHostException
RoutingException

clearPath

public void clearPath(Node src,
                      Node dst)
Remove the SPF path computed between source node an destination node from the cache This method must be used if the path have potentially changed.

Specified by:
clearPath in interface SPFCache
Parameters:
src - the source node
dst - the destination node

clear

public void clear()
Remove all the SPF path in the cache *

Specified by:
clear in interface SPFCache


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