edu.isi.pegasus.planner.catalog.site.impl.old

## Class Abstract

- java.lang.Object
- - edu.isi.pegasus.planner.catalog.site.impl.old.PoolInfoProvider
  - - edu.isi.pegasus.planner.catalog.site.impl.old.Abstract

Direct Known Subclasses:
  Text, XML

    public abstract class Abstract
    extends PoolInfoProvider

An abstract implementation of the PoolInfoProvider. Implementations should extend it, only if they are statically loading information into a `PoolConfig` object. The object once populated contains all the contents of the catalog.

Version:
  $Revision$
Author:
  Karan Vahi
See Also:
  `mPoolConfig`

### Field Summary

Fields
`protected PoolConfig` `mPoolConfig` Handle to the PoolConfig object

### Fields inherited from class edu.isi.pegasus.planner.catalog.site.impl.old.PoolInfoProvider

`mDeepStorageStructure, mLogger, mLogMsg, mPoolProvider, mProps, mStorageDir, mUserOpts, mWorkDir, PEGASUS_HOME, VDS_HOME`

### Constructor Summary

Constructors
Constructor and Description
`Abstract()`

### Method Summary

All Methods Instance Methods Concrete Methods
`java.util.List` `getGridFTPServers(java.lang.String siteID)` It returns all the gridftp servers corresponding to a specified pool.
`java.util.List` `getJobmanagers(java.lang.String siteID)` It returns all the jobmanagers corresponding to a specified site.
`java.util.List` `getJobmanagers(java.lang.String siteID, java.lang.String universe)` It returns all the jobmanagers corresponding to a specified pool and universe.
`SiteInfo` `getPoolEntry(java.lang.String siteID, java.lang.String universe)` Gets the pool information from the pool.config file on the basis of the name of the pool, and the universe.
`java.util.List` `getPoolProfile(java.lang.String siteID)` It returns the profile information associated with a particular pool.
`java.util.List` `getPools()` It returns all the pools available in the site catalog
`VDSSysInfo` `getSysinfo(java.lang.String siteID)` Returns the System information for a single site.
`java.util.Map` `getSysinfos(java.util.List siteids)` Returns the System information for a bunch of sites.
`boolean` `removeGridFtp(java.lang.String siteID, java.lang.String urlPrefix)` This is a soft state remove, that removes a gridftp server from a particular pool entry.
`boolean` `removeJobManager(java.lang.String siteID, java.lang.String universe, java.lang.String jobManagerContact)` This is a soft state remove, that removes a jobmanager from a particular pool entry.

### Methods inherited from class edu.isi.pegasus.planner.catalog.site.impl.old.PoolInfoProvider

`getEnvironmentVariable, getExecPoolWorkDir, getExecPoolWorkDir, getExecPoolWorkDir, getExecPoolWorkDir, getPegasusHome, getPoolMode, getPoolProfile, getSeMountPoint, getTXPoolEntry, getURLPrefix, getVDS_HOME, loadNonSingletonObjects, loadSingletonObjects, logMessage, nonSingletonInstance, selectGridFtp, selectLRC, selectWorkdir, singletonInstance`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### mPoolConfig

    protected PoolConfig mPoolConfig

Handle to the PoolConfig object

### Constructor Detail

#### Abstract

    public Abstract()

### Method Detail

#### getSysinfos

    public java.util.Map getSysinfos(java.util.List siteids)

Returns the System information for a bunch of sites.

Specified by:
  `getSysinfos` in class `PoolInfoProvider`
Parameters:
  `siteids` - List The siteid whose system information is required
Returns:
  Map The key is the siteid and the value is a VDSSysInfo object
See Also:
  `org.griphyn.common.classes.VDSSysInfo`

#### getSysinfo

    public VDSSysInfo getSysinfo(java.lang.String siteID)

Returns the System information for a single site.

Specified by:
  `getSysinfo` in class `PoolInfoProvider`
Parameters:
  `siteID` - String The site whose system information is requested
Returns:
  VDSSysInfo The system information as a VDSSysInfo object
See Also:
  `org.griphyn.common.classes.VDSSysInfo`

#### getPoolEntry

    public SiteInfo getPoolEntry(java.lang.String siteID,
                                 java.lang.String universe)

Gets the pool information from the pool.config file on the basis of the name of the pool, and the universe.

Specified by:
  `getPoolEntry` in class `PoolInfoProvider`
Parameters:
  `siteID` - the name of the site
  `universe` - the execution universe for the job
Returns:
  the corresponding pool object for the entry if found else null

#### getPoolProfile

    public java.util.List getPoolProfile(java.lang.String siteID)

It returns the profile information associated with a particular pool. If the pool provider has no such information it should return null. The name of the object may purport that it is specific to GVDS format, but in fact it a tuple consisting of namespace, key and value that can be used by other Pool providers too.

Specified by:
  `getPoolProfile` in class `PoolInfoProvider`
Parameters:
  `siteID` - the name of the site, whose profile information you want.
Returns:
  List of `Profile` objects null if the information about the site is not with the pool provider.
See Also:
  `org.griphyn.cPlanner.classes.Profile`

#### getJobmanagers

    public java.util.List getJobmanagers(java.lang.String siteID)

It returns all the jobmanagers corresponding to a specified site.

Specified by:
  `getJobmanagers` in class `PoolInfoProvider`
Parameters:
  `siteID` - the name of the site at which the jobmanager runs.
Returns:
  list of `JobManager`, each referring to one jobmanager contact string. An empty list if no jobmanagers found.

#### getJobmanagers

    public java.util.List getJobmanagers(java.lang.String siteID,
                                         java.lang.String universe)

It returns all the jobmanagers corresponding to a specified pool and universe.

Specified by:
  `getJobmanagers` in class `PoolInfoProvider`
Parameters:
  `siteID` - the name of the site at which the jobmanager runs.
  `universe` - the gvds universe with which it is associated.
Returns:
  list of `JobManager`, each referring to one jobmanager contact string. An empty list if no jobmanagers found.

#### getGridFTPServers

    public java.util.List getGridFTPServers(java.lang.String siteID)

It returns all the gridftp servers corresponding to a specified pool.

Specified by:
  `getGridFTPServers` in class `PoolInfoProvider`
Parameters:
  `siteID` - the name of the site at which the jobmanager runs.
Returns:
  List of `GridFTPServer`, each referring to one GridFtp Server.

#### getPools

    public java.util.List getPools()

It returns all the pools available in the site catalog

Specified by:
  `getPools` in class `PoolInfoProvider`
Returns:
  List of names of the pools available as String

#### removeJobManager

    public boolean removeJobManager(java.lang.String siteID,
                                    java.lang.String universe,
                                    java.lang.String jobManagerContact)

This is a soft state remove, that removes a jobmanager from a particular pool entry. The cause of this removal could be the inability to authenticate against it at runtime. The successful removal lead Pegasus not to schedule job on that particular jobmanager.

Specified by:
  `removeJobManager` in class `PoolInfoProvider`
Parameters:
  `siteID` - the name of the site at which the jobmanager runs.
  `universe` - the gvds universe with which it is associated.
  `jobManagerContact` - the contact string to the jobmanager.
Returns:
  true if was able to remove the jobmanager from the cache false if unable to remove, or the matching entry is not found or if the implementing class does not maintain a soft state.

#### removeGridFtp

    public boolean removeGridFtp(java.lang.String siteID,
                                 java.lang.String urlPrefix)

This is a soft state remove, that removes a gridftp server from a particular pool entry. The cause of this removal could be the inability to authenticate against it at runtime. The successful removal lead Pegasus not to schedule any transfers on that particular gridftp server.

Specified by:
  `removeGridFtp` in class `PoolInfoProvider`
Parameters:
  `siteID` - the name of the site at which the gridftp runs.
  `urlPrefix` - the url prefix containing the protocol,hostname and port.
Returns:
  true if was able to remove the gridftp from the cache false if unable to remove, or the matching entry is not found or if the implementing class does not maintain a soft state. or the information about site is not in the site catalog.