edu.isi.pegasus.planner.catalog.site.classes
Class HeadNodeFS

java.lang.Object
  extended by edu.isi.pegasus.planner.catalog.site.classes.SiteData
      extended by edu.isi.pegasus.planner.catalog.site.classes.AbstractSiteData
          extended by edu.isi.pegasus.planner.catalog.site.classes.HeadNodeFS
All Implemented Interfaces:
Cloneable

public class HeadNodeFS
extends AbstractSiteData

This data class describes the HeadNode Filesystem layout.

Version:
$Revision: 2572 $
Author:
Karan Vahi

Field Summary
private  Profiles mProfiles
          The profiles associated with the headnode filesystem.
private  HeadNodeScratch mScratch
          The scratch area on the head node.
private  HeadNodeStorage mStorage
          The storage area on the head node.
 
Constructor Summary
HeadNodeFS()
          The default constructor.
HeadNodeFS(HeadNodeScratch scratch, HeadNodeStorage storage)
          The overloaded constructor.
 
Method Summary
 void addProfile(Profile p)
          Adds a profile.
 Object clone()
          Returns the clone of the object.
 HeadNodeScratch getScratch()
          Returns the scratch area on the head node.
 HeadNodeStorage getStorage()
          Returns the storage area on the head node.
 FileServer selectScratchLocalFileServer()
          Selects a FileServer associated with the Local Directory on the Scratch system.
 FileServer selectScratchSharedFileServer()
          Selects a FileServer associated with the Shared Directory on the Scratch system.
 FileServer selectStorageFileServerForStageout()
          A convenience method that returns a file server to be used for stageout.
 FileServer selectStorageLocalFileServer()
          Selects a FileServer associated with the Local Directory on the Storage system.
 FileServer selectStorageSharedFileServer()
          Selects a FileServer associated with the Shared Directory on the Storage system.
 void setProfiles(Profiles profiles)
          Sets the profiles associated with the file server.
 void setScratch(HeadNodeScratch scratch)
          Sets the scratch area on the head node.
 void setStorage(HeadNodeStorage storage)
          Sets the storage area on the head node.
 void toXML(Writer writer, String indent)
          Writes out the xml description of the object.
 
Methods inherited from class edu.isi.pegasus.planner.catalog.site.classes.AbstractSiteData
toString, toXML, writeAttribute
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

mScratch

private HeadNodeScratch mScratch
The scratch area on the head node.


mStorage

private HeadNodeStorage mStorage
The storage area on the head node.


mProfiles

private Profiles mProfiles
The profiles associated with the headnode filesystem.

Constructor Detail

HeadNodeFS

public HeadNodeFS()
The default constructor.


HeadNodeFS

public HeadNodeFS(HeadNodeScratch scratch,
                  HeadNodeStorage storage)
The overloaded constructor.

Parameters:
scratch - the scratch area.
storage - the storage area.
Method Detail

setScratch

public void setScratch(HeadNodeScratch scratch)
Sets the scratch area on the head node.

Parameters:
scratch - the scratch area.

selectScratchLocalFileServer

public FileServer selectScratchLocalFileServer()
Selects a FileServer associated with the Local Directory on the Scratch system.

Returns:
if specified, else null

selectScratchSharedFileServer

public FileServer selectScratchSharedFileServer()
Selects a FileServer associated with the Shared Directory on the Scratch system.

Returns:
if specified, else null

getScratch

public HeadNodeScratch getScratch()
Returns the scratch area on the head node.

Returns:
the scratch area.

setStorage

public void setStorage(HeadNodeStorage storage)
Sets the storage area on the head node.

Parameters:
storage - the storage area.

selectStorageFileServerForStageout

public FileServer selectStorageFileServerForStageout()
A convenience method that returns a file server to be used for stageout. It selects a FileServer associated with the Local Directory. If that is null, it then selects a FileServer associated with the Shared Directory.

Returns:
storage FileServer for stageout.

selectStorageLocalFileServer

public FileServer selectStorageLocalFileServer()
Selects a FileServer associated with the Local Directory on the Storage system.

Returns:
if specified, else null

selectStorageSharedFileServer

public FileServer selectStorageSharedFileServer()
Selects a FileServer associated with the Shared Directory on the Storage system.

Returns:
if specified, else null

getStorage

public HeadNodeStorage getStorage()
Returns the storage area on the head node.

Returns:
the storage area.

addProfile

public void addProfile(Profile p)
Adds a profile.

Parameters:
p - the profile to be added

setProfiles

public void setProfiles(Profiles profiles)
Sets the profiles associated with the file server.

Parameters:
profiles - the profiles.

toXML

public void toXML(Writer writer,
                  String indent)
           throws IOException
Writes out the xml description of the object.

Specified by:
toXML in class AbstractSiteData
Parameters:
writer - is a Writer opened and ready for writing. This can also be a StringWriter for efficient output.
indent - the indent to be used.
Throws:
IOException - if something fishy happens to the stream.

clone

public Object clone()
Returns the clone of the object.

Overrides:
clone in class AbstractSiteData
Returns:
the clone


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