edu.isi.pegasus.planner.catalog.site.classes
public class SiteCatalogEntry extends AbstractSiteData
Modifier and Type | Field and Description |
---|---|
private Map<Directory.TYPE,Directory> |
mDirectories
A Map of different directories indexed by Directory.TYPE associated
with the site catalog entry
|
private Map<GridGateway.JOB_TYPE,GridGateway> |
mGridGateways
Map of grid gateways at the site for submitting different job types.
|
private String |
mID
The site identifier.
|
private Profiles |
mProfiles
The profiles asscociated with the site.
|
private List<ReplicaCatalog> |
mReplicaCatalogs
The list of replica catalog associated with the site.
|
private SysInfo |
mSysInfo
The System Information for the Site.
|
static String |
PEGASUS_BIN_DIR
The name of the environment variable PEGASUS_BIN_DIR.
|
static String |
PEGASUS_HOME
The name of the environment variable PEGASUS_HOME.
|
static String |
VDS_HOME
The name of the environment variable VDS_HOME.
|
Constructor and Description |
---|
SiteCatalogEntry()
The default constructor.
|
SiteCatalogEntry(String id)
The overloaded constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
accept(SiteDataVisitor visitor)
Accept method for the visitor interface
|
void |
addDirectory(Directory directory)
Adds a directory internally.
|
void |
addGridGateway(GridGateway g)
Add a GridGateway to the site.
|
void |
addProfile(Profile p)
Adds a profile.
|
void |
addReplicaCatalog(ReplicaCatalog catalog)
Add a Replica Catalog to the site.
|
Object |
clone()
Returns the clone of the object.
|
SysInfo.Architecture |
getArchitecture()
Returns the architecture of the site.
|
Directory |
getDirectory(Directory.TYPE type)
Returns a directory corresponding to a particular type
|
Iterator<Directory> |
getDirectoryIterator()
Returns a directory corresponding to a particular type
|
String |
getEnvironmentVariable(String variable)
Returns an environment variable associated with the site.
|
Iterator |
getFileServerIterator()
Not implmented as yet.
|
List |
getFileServers()
Not implemented as yet.
|
String |
getGlibc()
Returns the glibc version of the site.
|
GridGateway |
getGridGateway(GridGateway.JOB_TYPE type)
Returns a grid gateway object corresponding to a job type.
|
Iterator<GridGateway> |
getGridGatewayIterator()
Return an iterator to value set of the Map.
|
List |
getGridGateways()
Not implemented as yet
|
Directory |
getHeadNodeStorageDirectory()
Returns the local-storage directory.
|
String |
getInternalMountPointOfWorkDirectory()
Returns the work directory for the compute jobs on a site.
|
SysInfo.OS |
getOS()
Returns the OS of the site.
|
String |
getOSRelease()
Returns the OS release of the site.
|
String |
getOSVersion()
Returns the OS version of the site.
|
String |
getPegasusHome()
Deprecated.
|
Profiles |
getProfiles()
Returns the profiles associated with the site.
|
Iterator<ReplicaCatalog> |
getReplicaCatalogIterator()
Return an iterator to the replica catalog associated with the site.
|
String |
getSiteHandle()
Returns the site handle for the site
|
SysInfo |
getSysInfo()
Returns the System Information associated with the Site.
|
String |
getVDSHome()
Deprecated.
|
VDSSysInfo |
getVDSSysInfo()
Returns the sysinfo for the site.
|
void |
initialize(String id)
Initializes the object.
|
boolean |
removeGridGateway(String contact)
This is a soft state remove, that removes a GridGateway from a particular
site.
|
GridGateway |
selectGridGateway(GridGateway.JOB_TYPE type)
Selects a grid gateway object corresponding to a job type.
|
FileServer |
selectHeadNodeScratchSharedFileServer(FileServerType.OPERATION operation)
A convenience method to select the FileServer for the shared scratch
space on the HeadNode.
|
String |
selectHeadNodeScratchSharedFileServerURLPrefix(FileServerType.OPERATION operation)
Deprecated.
should be removed
|
ReplicaCatalog |
selectReplicaCatalog()
Selects a Random ReplicaCatalog.
|
FileServer |
selectStorageFileServerForStageout(FileServerType.OPERATION operation)
A convenience method that selects a file server for staging the data out to
a site.
|
void |
setArchitecture(SysInfo.Architecture arch)
Sets the architecture of the site.
|
void |
setDirectory(Directory directory)
Sets a directory corresponding to a particular type
|
void |
setGlibc(String version)
Sets the glibc version on the site.
|
void |
setOS(SysInfo.OS os)
Sets the OS of the site.
|
void |
setOSRelease(String release)
Sets the OS release of the site.
|
void |
setOSVersion(String version)
Sets the OS version of the site.
|
void |
setProfiles(Profiles profiles)
Sets the profiles associated with the file server.
|
void |
setSiteHandle(String id)
Sets the site handle for the site
|
void |
setSysInfo(SysInfo sysinfo)
Sets the System Information associated with the Site.
|
void |
setVDSSysInfo(VDSSysInfo sysinfo)
Sets the sysinfo for the site.
|
void |
toXML(Writer writer,
String indent)
Writes out the xml description of the object.
|
toString, toXML, writeAttribute
public static final String PEGASUS_BIN_DIR
public static final String PEGASUS_HOME
public static final String VDS_HOME
private String mID
private SysInfo mSysInfo
private Profiles mProfiles
private Map<Directory.TYPE,Directory> mDirectories
private Map<GridGateway.JOB_TYPE,GridGateway> mGridGateways
private List<ReplicaCatalog> mReplicaCatalogs
public SiteCatalogEntry()
public SiteCatalogEntry(String id)
id
- the site identifier.public Iterator getFileServerIterator()
public List getFileServers()
public List getGridGateways()
public void initialize(String id)
id
- the site identifier.public void setSiteHandle(String id)
id
- the site identifier.public String getSiteHandle()
public void setSysInfo(SysInfo sysinfo)
sysinfo
- the system information of the site.public SysInfo getSysInfo()
public void setArchitecture(SysInfo.Architecture arch)
arch
- the architecture.public SysInfo.Architecture getArchitecture()
public void setOS(SysInfo.OS os)
os
- the os of the site.public SysInfo.OS getOS()
public void setVDSSysInfo(VDSSysInfo sysinfo)
sysinfo
- public VDSSysInfo getVDSSysInfo()
public void setOSRelease(String release)
release
- the os releaseof the site.public String getOSRelease()
public void setOSVersion(String version)
version
- the os versionof the site.public String getOSVersion()
public void setGlibc(String version)
version
- the glibc version of the site.public String getGlibc()
public void addDirectory(Directory directory)
directory
- the directory to be added.public void setDirectory(Directory directory)
directory
- the directory to be setpublic Iterator<Directory> getDirectoryIterator()
public Directory getDirectory(Directory.TYPE type)
the
- type the directory typepublic Directory getHeadNodeStorageDirectory()
public String getInternalMountPointOfWorkDirectory()
public void addProfile(Profile p)
p
- the profile to be addedpublic void setProfiles(Profiles profiles)
profiles
- the profiles.public Profiles getProfiles()
@Deprecated public String getVDSHome()
@Deprecated public String getPegasusHome()
public String getEnvironmentVariable(String variable)
variable
- the environment variable whose value is required.public GridGateway getGridGateway(GridGateway.JOB_TYPE type)
type
- the job typepublic GridGateway selectGridGateway(GridGateway.JOB_TYPE type)
type
- the job typepublic String selectHeadNodeScratchSharedFileServerURLPrefix(FileServerType.OPERATION operation)
operation
- the operation for which the file server is requiredpublic FileServer selectHeadNodeScratchSharedFileServer(FileServerType.OPERATION operation)
operation
- the operation for which the file server is requiredpublic FileServer selectStorageFileServerForStageout(FileServerType.OPERATION operation)
FileServer
selected is associated with the HeadNode Filesystem.
For get and put operations, the results default back to searching for an
ALL server.operation
- the operation for which the file server is requiredFileServer
else null.public Iterator<GridGateway> getGridGatewayIterator()
public void addGridGateway(GridGateway g)
g
- the grid gateway to be added.public boolean removeGridGateway(String contact)
contact
- the contact string for the grid gateway.public Iterator<ReplicaCatalog> getReplicaCatalogIterator()
public void addReplicaCatalog(ReplicaCatalog catalog)
catalog
- the replica catalog to be added.public ReplicaCatalog selectReplicaCatalog()
ReplicaCatalog if more than one associates else
returns null.
public void toXML(Writer writer, String indent) throws IOException
toXML
in class AbstractSiteData
writer
- is a Writer opened and ready for writing. This can also
be a StringWriter for efficient output.indent
- the indent to be used.IOException
- if something fishy happens to the stream.public Object clone()
clone
in class AbstractSiteData
public void accept(SiteDataVisitor visitor) throws IOException
accept
in class AbstractSiteData
visitor
- the visitorIOException
- in case of error