Class PoolConfig
- java.lang.Object
-
- edu.isi.pegasus.planner.catalog.site.impl.old.classes.PoolConfig
-
public class PoolConfig extends java.lang.Object
A data class to store information about the various remote sites.- Version:
- $Revision$
- Author:
- Gaurang Mehta, Karan Vahi
- See Also:
SiteInfo
-
-
Field Summary
Fields Modifier and Type Field Description private LogManager
mLogger
The handle to the logging object.private java.util.HashMap
mSiteCatalog
The map indexed by the site handle.
-
Constructor Summary
Constructors Constructor Description PoolConfig()
The default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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(java.lang.String id, SiteInfo site)
Adds a SiteInfo object to the container.boolean
contains(java.lang.String id)
Returns a boolean indicating if an entry for a Site with a particular id exists or not.SiteInfo
get(java.lang.String siteID)
Retrives the information about a site.java.util.Map
getSites()
Returns information about all the sites.java.lang.String
toMultiLine()
Returns the textual description of the contents ofPoolConfig
object in the multiline format.java.lang.String
toXML()
Returns the XML description of the contents ofPoolConfig
object.
-
-
-
Field Detail
-
mSiteCatalog
private java.util.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.
-
-
Method Detail
-
add
public void add(java.lang.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
- theSiteInfo
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(java.lang.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(java.lang.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 java.util.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 java.lang.String toMultiLine()
Returns the textual description of the contents ofPoolConfig
object in the multiline format.- Returns:
- the textual description in multiline format.
-
toXML
public java.lang.String toXML()
Returns the XML description of the contents ofPoolConfig
object.- Returns:
- the xml description.
-
-