org.globus.exec.service.test.throughput.util
Class JobManager

java.lang.Object
  extended by org.globus.exec.service.test.throughput.util.JobManager

public class JobManager
extends java.lang.Object

Holds a list of references and information of all submitted jobs that are still alive on the server-side. Also holds information about how many jobs had been submitted and how many jobs had been completed (including termination)


Field Summary
private  java.lang.Integer accepted
           
private  java.lang.Integer completed
           
private static org.apache.commons.logging.Log log
           
private  java.util.HashMap<java.lang.String,JobInformation> outstandingJobs
           
private  java.util.HashMap<JobStateType,java.lang.Integer> stateCountMap
           
private  Test test
           
 
Constructor Summary
JobManager(Test test)
           
 
Method Summary
 void addJob(org.globus.axis.message.addressing.EndpointReferenceType epr, JobInformation entry)
          Add a job
 JobInformation getJob(org.globus.axis.message.addressing.EndpointReferenceType epr)
          Get information about a job or null in case the job does not exist anymore.
 org.globus.axis.message.addressing.EndpointReferenceType[] getJobList()
          Get a list of EPR's of all jobs that had been accepted and that still exist on the server-side.
 TestStatus getTestStatus()
          Get the number of overall accepted jobs.
 boolean isJobGoneOrDestroyed(org.globus.axis.message.addressing.EndpointReferenceType epr)
          Check whether a job had gone or termination with destroyAfterCleanup had been reqested.
 void removeJob(org.globus.axis.message.addressing.EndpointReferenceType epr)
          Remove information of a job.
 JobInformation updateJobState(org.globus.axis.message.addressing.EndpointReferenceType epr, StateEnumeration state)
          Update the state of a job.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static org.apache.commons.logging.Log log

stateCountMap

private java.util.HashMap<JobStateType,java.lang.Integer> stateCountMap

outstandingJobs

private java.util.HashMap<java.lang.String,JobInformation> outstandingJobs

accepted

private java.lang.Integer accepted

completed

private java.lang.Integer completed

test

private Test test
Constructor Detail

JobManager

public JobManager(Test test)
Method Detail

getJobList

public org.globus.axis.message.addressing.EndpointReferenceType[] getJobList()
Get a list of EPR's of all jobs that had been accepted and that still exist on the server-side.


getJob

public JobInformation getJob(org.globus.axis.message.addressing.EndpointReferenceType epr)
Get information about a job or null in case the job does not exist anymore.


addJob

public void addJob(org.globus.axis.message.addressing.EndpointReferenceType epr,
                   JobInformation entry)
Add a job


updateJobState

public JobInformation updateJobState(org.globus.axis.message.addressing.EndpointReferenceType epr,
                                     StateEnumeration state)
Update the state of a job. If notifications enter in wrong order, i.e. Done after CleanUp, the job will not be updated and the update request will be ignored.


removeJob

public void removeJob(org.globus.axis.message.addressing.EndpointReferenceType epr)
Remove information of a job. To be called after job termination. completedCount will be increased automatically.


isJobGoneOrDestroyed

public boolean isJobGoneOrDestroyed(org.globus.axis.message.addressing.EndpointReferenceType epr)
Check whether a job had gone or termination with destroyAfterCleanup had been reqested.


getTestStatus

public TestStatus getTestStatus()
Get the number of overall accepted jobs.