org.gridbus.broker.farming.globus
Class JobRSL

java.lang.Object
  extended by org.gridbus.broker.farming.globus.JobRSL

public class JobRSL
extends java.lang.Object

This class has methods to work with RSL, which described jobs for Globus

Author:
Jia Yu (jiayu@cs.mu.oz.au)

Constructor Summary
JobRSL()
           
 
Method Summary
 java.lang.String getArguments()
          Returns the arguments of the job
 java.lang.String getDirectory()
          Returns the directory for the job
 java.lang.String getExecutable()
          Returns the name of the job executable
 GassServerContainer getGassServer()
          Returns the GassServerUtil object associated with the resource
 java.lang.String getJobRSL(boolean BATCH_JOB)
          Generates the RSL.
 int getMaxCPUTime()
          Returns the maximum CPU time to specify in the RSL
 int getMaxMemory()
          Returns the maximum memory required to specify in the RSL
 int getMaxWallTime()
          Returns the maximum time allowed for executing the job.
 int getMinmemory()
          Returns the minimum memory required for the job.
 int getNumprocs()
          Returns the number of processors required for the job.
 java.lang.String getQueue()
          Returns the queue for this resource
 java.lang.String getStderr()
          Returns the std err for the resource
 java.lang.String getStdout()
          Returns the std out for the resource
 void setArguments(java.lang.String string)
          Sets the arguments for the job
 void setCurrentWorkingDir(java.lang.String currentWorkingDir)
          Sets the working directory CWD for use with GASS servers.
 void setDirectory(java.lang.String string)
          Sets the directory for the job
 void setExecutable(java.lang.String executable)
          Sets the executable for the job
 void setGassServer(GassServerContainer o)
          Sets the GASS server for this job
 void setMaxCPUTime(int i)
          Sets the maximum CPU time for the job
 void setMaxMemory(int i)
          Set the maximum memory allowed for the job.
 void setMaxWallTime(int i)
          Sets the maximum time allowed for the job
 void setMinMemory(int i)
          Sets the minimum memory for the job.
 void setNumprocs(int i)
          Sets the number of processors required for this job
 void setQueue(java.lang.String string)
          Sets the job queue.
 void setStderr(java.lang.String string)
          Sets the std err for this job
 void setStdout(java.lang.String string)
          Sets the std out for this job
 java.lang.String toRSL()
          Returns a string representation for the Job RSL description
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JobRSL

public JobRSL()
Method Detail

setCurrentWorkingDir

public void setCurrentWorkingDir(java.lang.String currentWorkingDir)
Sets the working directory CWD for use with GASS servers. Should be set to BrokerProperties.LOCAL_DIR.

Parameters:
currentWorkingDir -

setExecutable

public void setExecutable(java.lang.String executable)
Sets the executable for the job

Parameters:
executable -

toRSL

public java.lang.String toRSL()
Returns a string representation for the Job RSL description

Returns:
rsl for the job

getArguments

public java.lang.String getArguments()
Returns the arguments of the job

Returns:
job arguments

getDirectory

public java.lang.String getDirectory()
Returns the directory for the job

Returns:
job directory

getExecutable

public java.lang.String getExecutable()
Returns the name of the job executable

Returns:
job executable name

getMaxCPUTime

public int getMaxCPUTime()
Returns the maximum CPU time to specify in the RSL

Returns:
max. CPU time

getMaxMemory

public int getMaxMemory()
Returns the maximum memory required to specify in the RSL

Returns:
maximum memory required

getMaxWallTime

public int getMaxWallTime()
Returns the maximum time allowed for executing the job.

Returns:
max. allowed time

getMinmemory

public int getMinmemory()
Returns the minimum memory required for the job.

Returns:
minimum memory required

getNumprocs

public int getNumprocs()
Returns the number of processors required for the job.

Returns:
# of processors

getQueue

public java.lang.String getQueue()
Returns the queue for this resource

Returns:
queue for this resource

getStderr

public java.lang.String getStderr()
Returns the std err for the resource

Returns:
std err

getStdout

public java.lang.String getStdout()
Returns the std out for the resource

Returns:
std out

getGassServer

public GassServerContainer getGassServer()
Returns the GassServerUtil object associated with the resource

Returns:
gass server

setArguments

public void setArguments(java.lang.String string)
Sets the arguments for the job

Parameters:
string -

setDirectory

public void setDirectory(java.lang.String string)
Sets the directory for the job

Parameters:
string -

setMaxCPUTime

public void setMaxCPUTime(int i)
Sets the maximum CPU time for the job

Parameters:
i -

setMaxWallTime

public void setMaxWallTime(int i)
Sets the maximum time allowed for the job

Parameters:
i -

setMaxMemory

public void setMaxMemory(int i)
Set the maximum memory allowed for the job.

Parameters:
i -

setMinMemory

public void setMinMemory(int i)
Sets the minimum memory for the job.

Parameters:
i -

setNumprocs

public void setNumprocs(int i)
Sets the number of processors required for this job

Parameters:
i -

setQueue

public void setQueue(java.lang.String string)
Sets the job queue.

Parameters:
string -

setStderr

public void setStderr(java.lang.String string)
Sets the std err for this job

Parameters:
string -

setStdout

public void setStdout(java.lang.String string)
Sets the std out for this job

Parameters:
string -

setGassServer

public void setGassServer(GassServerContainer o)
Sets the GASS server for this job

Parameters:
o -

getJobRSL

public java.lang.String getJobRSL(boolean BATCH_JOB)
Generates the RSL.

Parameters:
BATCH_JOB -
Returns:
rsl string