org.gridlab.gat.resources
Class JobDescription

java.lang.Object
  extended by org.gridlab.gat.resources.AbstractJobDescription
      extended by org.gridlab.gat.resources.JobDescription
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
WrapperJobDescription

public class JobDescription
extends AbstractJobDescription

An instance of this class describes a job to be run. It consists of a description of the "executable" (a SoftwareDescription), and of a description of the resource requirements of the job. The latter can be given as either a ResourceDescription, or as a specific Resource; only one of these may be specified.

See Also:
Serialized Form

Constructor Summary
JobDescription(SoftwareDescription softwareDescription)
          Create a job description with no resource description.
JobDescription(SoftwareDescription softwareDescription, Resource resource)
          Create a JobDescription out of a SoftwareDescription and a Resource.
JobDescription(SoftwareDescription softwareDescription, ResourceDescription resourceDescription)
          Create a JobDescription out of a SoftwareDescription and a ResourceDescription.
 
Method Summary
 Object clone()
           
 int getProcessCount()
          Get the number of processes, which is the total number of times the executable should be run.
 Resource getResource()
          Returns the Resource associated with this JobDescription.
 int getResourceCount()
          Get the number of resources, which is the total number of resources where the number of processes should be distributed on.
 ResourceDescription getResourceDescription()
          Returns the ResourceDescription associated with this JobDescription.
 SoftwareDescription getSoftwareDescription()
          Returns the SoftwareDescription associated with this JobDescription.
 void setProcessCount(int processCount)
          Set the number of processes, which is the total number of times the executable should be run.
 void setResource(Resource resource)
          Set the Resource associated with this JobDescription.
 void setResourceCount(int resourceCount)
          Set the number of resources, which is the total number of resources where the number of processes should be distributed on.
 void setResourceDescription(ResourceDescription resourceDescription)
          Set the ResourceDescription associated with this JobDescription.
 void setSoftwareDescription(SoftwareDescription softwareDescription)
          Set the SoftwareDescription associated with this JobDescription.
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JobDescription

public JobDescription(SoftwareDescription softwareDescription)
Create a job description with no resource description. I.e., we don't care where it runs, the ResourceBroker will choose the location.

Parameters:
softwareDescription - the SoftwareDescription of the executable.

JobDescription

public JobDescription(SoftwareDescription softwareDescription,
                      ResourceDescription resourceDescription)
Create a JobDescription out of a SoftwareDescription and a ResourceDescription.

Parameters:
softwareDescription - the SoftwareDescription of the executable.
resourceDescription - the ResourceDescription of the resource where the executable should run.

JobDescription

public JobDescription(SoftwareDescription softwareDescription,
                      Resource resource)
Create a JobDescription out of a SoftwareDescription and a Resource.

Parameters:
softwareDescription - the SoftwareDescription of the executable.
resource - the Resource where the executable should run on.
Method Detail

getResource

public Resource getResource()
Returns the Resource associated with this JobDescription.

Returns:
the Resource associated with this JobDescription.

setResource

public void setResource(Resource resource)
Set the Resource associated with this JobDescription.

Parameters:
resource - The Resource to set.

getResourceDescription

public ResourceDescription getResourceDescription()
Returns the ResourceDescription associated with this JobDescription.

Returns:
the associated ResourceDescription.

setResourceDescription

public void setResourceDescription(ResourceDescription resourceDescription)
Set the ResourceDescription associated with this JobDescription.

Parameters:
resourceDescription - The ResourceDescription to set.

getSoftwareDescription

public SoftwareDescription getSoftwareDescription()
Returns the SoftwareDescription associated with this JobDescription.

Returns:
the associated SoftwareDescription.

setSoftwareDescription

public void setSoftwareDescription(SoftwareDescription softwareDescription)
Set the SoftwareDescription associated with this JobDescription.

Parameters:
softwareDescription - The SoftwareDescription to set.

toString

public String toString()
Overrides:
toString in class Object

clone

public Object clone()
Overrides:
clone in class Object

getProcessCount

public int getProcessCount()
Get the number of processes, which is the total number of times the executable should be run.

Returns:
the number of processes

setProcessCount

public void setProcessCount(int processCount)
Set the number of processes, which is the total number of times the executable should be run.

Parameters:
processCount - the number of processes

getResourceCount

public int getResourceCount()
Get the number of resources, which is the total number of resources where the number of processes should be distributed on.

Returns:
the number of resources

setResourceCount

public void setResourceCount(int resourceCount)
Set the number of resources, which is the total number of resources where the number of processes should be distributed on.

Parameters:
resourceCount - the number of resources