org.griphyn.cPlanner.classes
Class PoolConfig

java.lang.Object
  extended by org.griphyn.cPlanner.classes.PoolConfig

public class PoolConfig
extends Object

A data class to store information about the various remote sites.

Version:
$Revision: 50 $
Author:
Gaurang Mehta, Karan Vahi
See Also:
SiteInfo

Field Summary
private  LogManager mLogger
          The handle to the logging object.
private  HashMap mSiteCatalog
          The map indexed by the site handle.
 
Constructor Summary
PoolConfig()
          The default constructor.
 
Method Summary
 void add(PoolConfig sites)
          Adds all the sites in a controlled fashion, to the existing map containing information about the sites.
 void add(PoolConfig sites, boolean overwrite)
          Adds all the sites in a controlled fashion, to the existing map containing information about the sites.
 void add(String id, SiteInfo site)
          Adds a SiteInfo object to the container.
 boolean contains(String id)
          Returns a boolean indicating if an entry for a Site with a particular id exists or not.
 SiteInfo get(String siteID)
          Retrives the information about a site.
 Map getSites()
          Returns information about all the sites.
 String toMultiLine()
          Returns the textual description of the contents of PoolConfig object in the multiline format.
 String toXML()
          Returns the XML description of the contents of PoolConfig object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mSiteCatalog

private HashMap mSiteCatalog
The map indexed by the site handle. Each value is a SiteInfo object, containing the information about a grid site.


mLogger

private LogManager mLogger
The handle to the logging object.

Constructor Detail

PoolConfig

public PoolConfig()
The default constructor.

Method Detail

add

public void add(String id,
                SiteInfo site)
Adds a SiteInfo object to the container. If an entry already exists with the same SiteID, it is overwritten.

Parameters:
id - the id of the site, usually the name of the site.
site - the SiteInfo object containing the information about the site.

add

public void add(PoolConfig sites)
Adds all the sites in a controlled fashion, to the existing map containing information about the sites. If an information about a site already exists, it is overwritten.

Parameters:
sites - a map indexed by siteid. Each value is a SiteInfo object.

add

public void add(PoolConfig sites,
                boolean overwrite)
Adds all the sites in a controlled fashion, to the existing map containing information about the sites.

Parameters:
sites - a map indexed by siteid. Each value is a SiteInfo object.
overwrite - resolves intersections, in case of a site already exists. If true, the orginal site information is overwritten with the new one. If false original site information remains.

contains

public boolean contains(String id)
Returns a boolean indicating if an entry for a Site with a particular id exists or not.

Parameters:
id - the id of the site, usually the name of the site.
Returns:
true if entry for the site exists, else false.

get

public SiteInfo get(String siteID)
Retrives the information about a site.

Parameters:
siteID - the id of the site, usually the name of the site.
Returns:
SiteInfo containing the site layout, else null in case of site not existing.

getSites

public Map getSites()
Returns information about all the sites.

Returns:
a Map indexed by the site id (name of the site). Each value is a SiteInfo object.

toMultiLine

public String toMultiLine()
Returns the textual description of the contents of PoolConfig object in the multiline format.

Returns:
the textual description in multiline format.

toXML

public String toXML()
Returns the XML description of the contents of PoolConfig object.

Returns:
the xml description.


Copyright © 2007 The University of Southern California. All Rights Reserved.