org.griphyn.cPlanner.classes
Class WorkDir

java.lang.Object
  extended by org.griphyn.cPlanner.classes.WorkDir

public class WorkDir
extends Object

This is a data class that is used to store information about the scratch work directory or the execution mount point on the remote pool.

The various attributes that can be associated with the work directory displayed in the following table.

Attribute NameAttribute Description
path the absolute path on the remote site to the work directory.
total size the total scratch space available under the work directory.
free size the free space available under the work directory.

Version:
$Revision: 109 $
Author:
Gaurang Mehta gmehta@isi.edu, Karan Vahi vahi@isi.edu

Field Summary
static int FREE_SIZE
          The constant to be passed to the accessor functions to get or set the free space available.
private  String mFreeSize
          The free space available at the file system under this directory.
private  String mTotalSize
          The total space available at the file system under this directory.
private  String mWorkDir
          The path to the work directory.
static int TOTAL_SIZE
          The constant to be passed to the accessor functions to get or set the total space available.
static int WORKDIR
          The constant to be passed to the accessor functions to get or set the path to the work directory.
static String[] WORKDIRINFO
          Array storing the names of the attributes that are stored with the work directory.
 
Constructor Summary
WorkDir()
          The default constructor.
 
Method Summary
 String getInfo(int key)
          Returns the attribute value of a particular attribute of the work directory.
 void setInfo(int key, String value)
          Sets an attribute associated with the work directory.
 String toMultiLine()
          Returns the textual description of the contents of WorkDir object in the multiline format.
 String toString()
          Returns the textual description of the contents of WorkDir object.
 String toXML()
          Returns the XML description of the contents of WorkDir object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

WORKDIRINFO

public static final String[] WORKDIRINFO
Array storing the names of the attributes that are stored with the work directory.


WORKDIR

public static final int WORKDIR
The constant to be passed to the accessor functions to get or set the path to the work directory.

See Also:
Constant Field Values

TOTAL_SIZE

public static final int TOTAL_SIZE
The constant to be passed to the accessor functions to get or set the total space available.

See Also:
Constant Field Values

FREE_SIZE

public static final int FREE_SIZE
The constant to be passed to the accessor functions to get or set the free space available.

See Also:
Constant Field Values

mWorkDir

private String mWorkDir
The path to the work directory.


mTotalSize

private String mTotalSize
The total space available at the file system under this directory.


mFreeSize

private String mFreeSize
The free space available at the file system under this directory.

Constructor Detail

WorkDir

public WorkDir()
The default constructor. Sets all the variables to null.

Method Detail

getInfo

public String getInfo(int key)
Returns the attribute value of a particular attribute of the work directory.

Parameters:
key - the key/attribute name.
Returns:
the attribute value
Throws:
RuntimeException - if illegal key defined.

setInfo

public void setInfo(int key,
                    String value)
             throws RuntimeException
Sets an attribute associated with the work directory.

Parameters:
key - the attribute key, which is one of the predefined keys.
value - value of the attribute.
Throws:
Exception - if illegal key defined.
RuntimeException

toMultiLine

public String toMultiLine()
Returns the textual description of the contents of WorkDir object in the multiline format.

Returns:
the textual description in multiline format.

toString

public String toString()
Returns the textual description of the contents of WorkDir object.

Overrides:
toString in class Object
Returns:
the textual description.

toXML

public String toXML()
Returns the XML description of the contents of WorkDir object.

Returns:
the xml description.


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