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

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.DirectoryType
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
LocalDirectory, SharedDirectory, WorkerSharedDirectory

public abstract class DirectoryType
extends AbstractSiteData

An abstract base class that creates a directory type. It associates multiple file servers and an internal mount point.

Author:
Karan Vahi

Field Summary
protected  List<FileServer> mFileServers
          The list of file servers that can be used to write to access this directory.
protected  InternalMountPoint mInternalMount
          The internal mount point for the directory.
 
Constructor Summary
DirectoryType()
          The default constructor.
DirectoryType(List<FileServer> fs, InternalMountPoint imt)
          The overloaded constructor
 
Method Summary
 void addFileServer(FileServer server)
          Adds a FileServer that can access this directory.
 Object clone()
          Returns the clone of the object.
 Iterator<FileServer> getFileServersIterator()
          Returns at iterator to the file servers.
 InternalMountPoint getInternalMountPoint()
          Returns the internal mount point for the directory.
 void initialize()
          Initializes the object
 void initialize(List<FileServer> fs, InternalMountPoint imt)
          Initializes the object
 boolean isEmpty()
          A convenience method that returns true if all the attributes values are uninitialized or empty strings.
 FileServer selectFileServer()
          Selects a random file server and returns it.
 void setFileServers(List<FileServer> servers)
          Sets the list of FileServers that can access this directory.
 void setInternalMountPoint(InternalMountPoint mountPoint)
          Sets the internal mount point for the directory.
 
Methods inherited from class edu.isi.pegasus.planner.catalog.site.classes.AbstractSiteData
toString, toXML, toXML, writeAttribute
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

mFileServers

protected List<FileServer> mFileServers
The list of file servers that can be used to write to access this directory.


mInternalMount

protected InternalMountPoint mInternalMount
The internal mount point for the directory.

Constructor Detail

DirectoryType

public DirectoryType()
The default constructor.


DirectoryType

public DirectoryType(List<FileServer> fs,
                     InternalMountPoint imt)
The overloaded constructor

Parameters:
fs - list of file servers
imt - the internal mount point.
Method Detail

initialize

public void initialize()
Initializes the object


initialize

public void initialize(List<FileServer> fs,
                       InternalMountPoint imt)
Initializes the object

Parameters:
fs - list of file servers
imt - the internal mount point.

addFileServer

public void addFileServer(FileServer server)
Adds a FileServer that can access this directory.

Parameters:
server - the file server.

setFileServers

public void setFileServers(List<FileServer> servers)
Sets the list of FileServers that can access this directory.

Parameters:
servers - the list of servers

selectFileServer

public FileServer selectFileServer()
Selects a random file server and returns it.

Returns:
FileServer

getFileServersIterator

public Iterator<FileServer> getFileServersIterator()
Returns at iterator to the file servers.

Returns:
Iterator

setInternalMountPoint

public void setInternalMountPoint(InternalMountPoint mountPoint)
Sets the internal mount point for the directory.

Parameters:
mountPoint - the internal mount point.

getInternalMountPoint

public InternalMountPoint getInternalMountPoint()
Returns the internal mount point for the directory.

Returns:
the internal mount point.

isEmpty

public boolean isEmpty()
A convenience method that returns true if all the attributes values are uninitialized or empty strings. Useful for serializing the object as XML.

Returns:
boolean

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.