|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--gov.nist.antd.optical.AbstractObject
|
+--gov.nist.antd.optical.path.PathContainer
The BackupContainer contains a list of backup routes. Different algorithms
can create different backup containers. This class Version 2.0 is
NOT BACKWARD COMPATIBLE
This class was developed at the National Institute of Standards and Technology by employees of the Federal Government in the course of their official duties. Pursuant to title 17 Section 105 of the United States Code this software is not subject to copyright protection and is in the public domain. NIST assumes no responsibility whatsoever for its use by other parties, and makes no guarantees, expressed or implied, about its quality, reliability, or any other characteristic.
We would appreciate acknowledgement if the software is used.
NIST ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" CONDITION AND DISCLAIM ANY LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
VERSION CONTROL
-------------------------------------------------------------------------
Name - YYYY/MM/DD - VERSION - ACTION
borchert - 2001/06/28 - 1.0 - Source created.
borchert - 2001/10/09 - 2.0 - Changed the PathContainer to be compatible
to deal with multiple networks. This is
such a major change that we decided to
change the version in lieu of the revision
number. The PathContainer is NOT BACKWARD
COMPATIBLE!
rouil - 2002/03/05 - 2.1 - Add removeContainers(OpNet).
borchert - 2002/04/25 - 2.2 - Change reference from OpNet to Glass.
borchert - 2002/06/06 - 2.3 - Changed Reference from OpticalRoute to
OpticalConnection.
rouil - 2002/06/20 - 2.4 - Updated OXCEdgeRouter to ExtRouter.
| Field Summary | |
private java.lang.String |
name
The name of the container. |
private static java.util.Hashtable |
NETWORKS
This hashtable contains the containers of each network.. |
private int |
noPath
Number of backup paths that are stored in the container. |
private OpticalConnection[] |
route
This routes are used for backup purposes. |
| Fields inherited from class gov.nist.antd.optical.AbstractObject |
INITIAL_ARRAY_SIZE |
| Constructor Summary | |
private |
PathContainer(java.lang.String name)
Generates a path container with the given name. |
| Method Summary | |
void |
addConnection(Glass net,
OpticalConnection newRoute)
Add a new Route to the container. |
void |
addRoute(Glass net,
OpticalConnection newRoute)
Deprecated. use addConnection (Glass, OpticalConnection) |
protected java.lang.Object[] |
createArray(int size)
Creates an array of the specified size. |
static void |
deleteContainer(Glass net,
java.lang.String name)
Determines the pathcontainer with the specified name and removed it out of the internal container list. |
OpticalConnection[] |
getAllConnections()
Returns all connections stored in this container. |
OpticalConnection[] |
getAllRoutes()
Deprecated. use getAllConnections () |
OpticalConnection[] |
getConnection(ExtRouter source,
ExtRouter destination)
Determines the requested routes stored for source and destination. |
OpticalConnection |
getConnection(int id)
Determines if the requested connection is stored. |
OpticalConnection[] |
getConnection(OpticalLink link)
Returns the OpticalConnection for the specific OpticalLink. |
static PathContainer |
getContainer(Glass net,
java.lang.String name)
Determines the pathcontainer with the specified name. |
private static java.util.Hashtable |
getContainerHash(Glass net)
Determines the pathcontainer hash. |
static java.util.Hashtable |
getContainers(Glass net)
Get the containers |
java.lang.String |
getName()
Returns the name of the container. |
OpticalConnection[] |
getRoute(ExtRouter source,
ExtRouter destination)
Deprecated. use getConnection (ExtRouter, ExtRouter) |
OpticalConnection |
getRoute(int id)
Deprecated. use getConnection |
OpticalConnection[] |
getRoute(OpticalLink link)
Deprecated. use getConnection (OpticalLink) |
int |
getSize()
Returns The number of paths stored in the container. |
void |
removeConnection(OpticalConnection oldRoute)
Removes the given connection out of the container. |
static void |
removeContainers(Glass net)
Remove the containers of the given net |
void |
removeRoute(OpticalConnection oldRoute)
Deprecated. use removeConnection (OpticalConnection) |
void |
setName(java.lang.String newName)
Set The name of the container. |
protected void |
setNoElements(int size)
Set the number of elements. |
| Methods inherited from class gov.nist.antd.optical.AbstractObject |
addElement, clear, isElementOf, removeElement |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private static final java.util.Hashtable NETWORKS
private int noPath
private java.lang.String name
private OpticalConnection[] route
| Constructor Detail |
private PathContainer(java.lang.String name)
name - The name of the path container.| Method Detail |
public static PathContainer getContainer(Glass net,
java.lang.String name)
net - The network the container has to be searched in.name - The name of the path container.
java.lang.NullPointerException - if the net is null.public static java.util.Hashtable getContainers(Glass net)
net - The OpNet that stores the path containers.
public static void removeContainers(Glass net)
net - The OpNet to remove
public static void deleteContainer(Glass net,
java.lang.String name)
net - The OpNet that stores the path containers.name - The name of the path container.
private static java.util.Hashtable getContainerHash(Glass net)
throws java.lang.NullPointerException
net - The network the pathcontainer belongs to.
java.lang.NullPointerException - If the given net is null.
public void addRoute(Glass net,
OpticalConnection newRoute)
net - The OpNet that stores the path containers.newRoute - the new OpticalConnection that has to be added to the
container.
public void addConnection(Glass net,
OpticalConnection newRoute)
net - The OpNet that stores the path containers.newRoute - the new OpticalConnection that has to be added to the
container.public OpticalConnection[] getAllRoutes()
public OpticalConnection[] getAllConnections()
public OpticalConnection getRoute(int id)
id - The ID of the route.
public OpticalConnection getConnection(int id)
id - The ID of the connection.
public OpticalConnection[] getRoute(ExtRouter source,
ExtRouter destination)
source - The source node.destination - The destination node.
public OpticalConnection[] getConnection(ExtRouter source,
ExtRouter destination)
source - The source node.destination - The destination node.
public OpticalConnection[] getRoute(OpticalLink link)
link - The OpticalLink the backup path is requested for.
public OpticalConnection[] getConnection(OpticalLink link)
link - The OpticalLink the backup path is requested for.
public void removeRoute(OpticalConnection oldRoute)
oldRoute - the OpticalConnection that has to be removed.public void removeConnection(OpticalConnection oldRoute)
oldRoute - the OpticalConnection that has to be removed.protected java.lang.Object[] createArray(int size)
createArray in class AbstractObjectsize - the given size.
public java.lang.String getName()
public void setName(java.lang.String newName)
newName - the new name of the container.protected void setNoElements(int size)
setNoElements in class AbstractObjectsize - the new number of elements.public int getSize()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||