|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuk.ac.ncl.cs.instantsoap.job.impl.JobManagerImpl
public class JobManagerImpl
Manage a set of jobs.
This implementation keeps jobs live for a maximum amount of time. It also will delete jobs within some maximum time that
| Constructor Summary | |
|---|---|
JobManagerImpl(JobFactory jobFactory,
ScheduledExecutorService jobCleaner)
|
|
| Method Summary | |
|---|---|
Throwable |
getFailureReason(UUID uuid)
Get the reason for failure for the job associated with the id. |
InvocationState |
getInvocationState(UUID uuid)
Get the invocation state associated with the id. |
Date |
getJobExecutionEndTime(UUID uuid)
Get the execution end time for the job associated with the id. |
Date |
getJobExecutionStartTime(UUID uuid)
Get the submission time for the job associated with the id. |
Date |
getJobSubmissionTime(UUID uuid)
Get the submission time for the job associated with the id. |
Map<String,String> |
getResult(UUID uuid)
Get the results of the job associated with the id. |
boolean |
isFailure(UUID uuid)
Return true if the job associated with the uuid has failed. |
UUID |
newJob()
Create a new Job and return the corresponding UUID. |
void |
setFailure(UUID uuid,
boolean failure)
Update the failure status of the job with the id. |
void |
setFailureReason(UUID uuid,
Throwable failureReason)
Set the reason for failure for the job associated with the id. |
void |
setInvocationState(UUID uuid,
InvocationState state)
Set the invocation state associated with the id. |
void |
setJobExecutionEndTime(UUID uuid,
Date time)
Set the execution end time for the job associated with the id. |
void |
setJobExecutionStartTime(UUID uuid,
Date time)
Set the submission time for the job associated with the id. |
void |
setJobSubmissionTime(UUID uuid,
Date time)
Set the submission time for the job associated with the id. |
void |
setResult(UUID uuid,
Map<String,String> result)
Set the results of the job associated with the id. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JobManagerImpl(JobFactory jobFactory,
ScheduledExecutorService jobCleaner)
| Method Detail |
|---|
public UUID newJob()
JobManagerJob and return the corresponding UUID.
newJob in interface JobManagerUUID of the new jobpublic boolean isFailure(UUID uuid)
JobManager
isFailure in interface JobManageruuid - the UUID of the job to check
public void setFailure(UUID uuid,
boolean failure)
JobManager
setFailure in interface JobManageruuid - the UUID identifying the jobfailure - the new failure status of the job
public void setResult(UUID uuid,
Map<String,String> result)
throws JobExecutionException
JobManager
setResult in interface JobManageruuid - the UUID identifying the jobresult - the Map containing the results
JobExecutionException
public Map<String,String> getResult(UUID uuid)
throws JobExecutionException
JobManager
getResult in interface JobManageruuid - the UUID identifying the job
Map of results
JobExecutionException
public Throwable getFailureReason(UUID uuid)
throws JobExecutionException
JobManager
getFailureReason in interface JobManageruuid - the UUID identifying the job
JobExecutionException
public void setFailureReason(UUID uuid,
Throwable failureReason)
throws JobExecutionException
JobManager
setFailureReason in interface JobManageruuid - the UUID identifying the jobfailureReason - the Throwable that is the reason for failure
JobExecutionExceptionpublic InvocationState getInvocationState(UUID uuid)
JobManager
getInvocationState in interface JobManageruuid - the UUID identifying the job
InvocationState
public void setInvocationState(UUID uuid,
InvocationState state)
JobManager
setInvocationState in interface JobManageruuid - the UUID identifying the jobstate - the InvocationStatuspublic Date getJobSubmissionTime(UUID uuid)
JobManager
getJobSubmissionTime in interface JobManageruuid - the UUID identifying the job
Date specifying the submission time
public void setJobSubmissionTime(UUID uuid,
Date time)
JobManager
setJobSubmissionTime in interface JobManageruuid - the UUID identifying the jobtime - the Date when the job was submitedpublic Date getJobExecutionStartTime(UUID uuid)
JobManager
getJobExecutionStartTime in interface JobManageruuid - the UUID identifying the job
Date that the execution of the job started
public void setJobExecutionStartTime(UUID uuid,
Date time)
JobManager
setJobExecutionStartTime in interface JobManageruuid - the UUID identifying the jobtime - the Date when the job started being executedpublic Date getJobExecutionEndTime(UUID uuid)
JobManager
getJobExecutionEndTime in interface JobManageruuid - the UUID identifying the job
Date when the execution of the job ended
public void setJobExecutionEndTime(UUID uuid,
Date time)
JobManager
setJobExecutionEndTime in interface JobManageruuid - the UUID identifying the job
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||