org.gridbus.broker.common
Class WorkUnit

java.lang.Object
  extended by org.gridbus.broker.common.WorkUnit
Direct Known Subclasses:
Job, WSCall

public abstract class WorkUnit
extends java.lang.Object


Field Summary
protected  ApplicationContext application
           
protected  java.lang.String name
           
protected  Service service
           
protected  int status
           
protected  Task task
           
protected  int type
           
protected  java.util.Map variableTable
           
 
Constructor Summary
WorkUnit()
           
 
Method Summary
 void addVariable(Variable var)
          Add a Variable to the variables list
 void clearVariables()
          Clear the variable list for this job
 ApplicationContext getApplication()
           
 long getCompletedTime()
           
 java.lang.String getErrorDescription()
           
 java.lang.String getName()
          Returns the Identification String for this job
 long getSubmittedTime()
           
 Task getTask()
          Task is the sequence of commands that describe what a job has to do.
 UserCredential getUserCredential()
           
 java.util.Map getVariableTable()
          Returns the hashtable containing variables and their values for this job.
 java.lang.String getVariableValue(java.lang.String name)
          returns the value of the variable name passed.
 java.util.Map getVariableValueTable()
          Returns the table of variables(values)
 long getWallClockTimeTaken()
          This function returns the difference between the job completed timestamp and the job submitted timestamp
 void removeVariable(Variable var)
          Remove the variable name passed and its corresponding values from the list of variables
 void setApplication(ApplicationContext application)
           
 void setCompletedTime(long completedTime)
           
 void setErrorDescription(java.lang.String errorDescription)
           
 void setName(java.lang.String name)
          Sets the job identifier
 void setSubmittedTime(long jobSubmittedTime)
           
 void setTask(Task task)
          This sets the task for this job
 void setUserCredential(UserCredential userCredential)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

application

protected ApplicationContext application

name

protected java.lang.String name

service

protected Service service

variableTable

protected java.util.Map variableTable

task

protected Task task

status

protected int status

type

protected int type
Constructor Detail

WorkUnit

public WorkUnit()
Method Detail

getName

public java.lang.String getName()
Returns the Identification String for this job

Returns:
job ID

setName

public void setName(java.lang.String name)
Sets the job identifier

Parameters:
name -

getWallClockTimeTaken

public long getWallClockTimeTaken()
This function returns the difference between the job completed timestamp and the job submitted timestamp

Returns:
time take in milliseconds

getUserCredential

public UserCredential getUserCredential()
Returns:
Returns the userCredential.

setUserCredential

public void setUserCredential(UserCredential userCredential)
Parameters:
userCredential - The userCredential to set.

getCompletedTime

public long getCompletedTime()
Returns:
Returns the jobCompletedTime.

setCompletedTime

public void setCompletedTime(long completedTime)
Parameters:
completedTime - The jobCompletedTime to set.

getSubmittedTime

public long getSubmittedTime()
Returns:
Returns the jobSubmittedTime.

setSubmittedTime

public void setSubmittedTime(long jobSubmittedTime)
Parameters:
jobSubmittedTime - The jobSubmittedTime to set.

getApplication

public ApplicationContext getApplication()
Returns:
Returns the application.

setApplication

public void setApplication(ApplicationContext application)
Parameters:
application - The application to set.

getErrorDescription

public java.lang.String getErrorDescription()
Returns:
Returns the errorDescription.

setErrorDescription

public void setErrorDescription(java.lang.String errorDescription)
Parameters:
errorDescription - The errorDescription to set.

getTask

public Task getTask()
Task is the sequence of commands that describe what a job has to do. This returns the task for this job

Returns:
task for this job

setTask

public void setTask(Task task)
This sets the task for this job

Parameters:
task -

getVariableTable

public java.util.Map getVariableTable()
Returns the hashtable containing variables and their values for this job.

Returns:
table of variables

addVariable

public void addVariable(Variable var)
Add a Variable to the variables list

Parameters:
var - - a Variable object which contains the variable name and the variable value

getVariableValue

public java.lang.String getVariableValue(java.lang.String name)
returns the value of the variable name passed.

Parameters:
name -
Returns:
value of the variable

getVariableValueTable

public java.util.Map getVariableValueTable()
Returns the table of variables(values)

Returns:
the table of variable values

removeVariable

public void removeVariable(Variable var)
Remove the variable name passed and its corresponding values from the list of variables

Parameters:
var -

clearVariables

public void clearVariables()
Clear the variable list for this job


Copyright © The University of Melbourne. 2006