|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object uk.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()
JobManager
Job
and return the corresponding UUID
.
newJob
in interface JobManager
UUID
of the new jobpublic boolean isFailure(UUID uuid)
JobManager
isFailure
in interface JobManager
uuid
- the UUID
of the job to check
public void setFailure(UUID uuid, boolean failure)
JobManager
setFailure
in interface JobManager
uuid
- the UUID
identifying the jobfailure
- the new failure status of the jobpublic void setResult(UUID uuid, Map<String,String> result) throws JobExecutionException
JobManager
setResult
in interface JobManager
uuid
- the UUID
identifying the jobresult
- the Map
containing the results
JobExecutionException
public Map<String,String> getResult(UUID uuid) throws JobExecutionException
JobManager
getResult
in interface JobManager
uuid
- the UUID
identifying the job
Map
of results
JobExecutionException
public Throwable getFailureReason(UUID uuid) throws JobExecutionException
JobManager
getFailureReason
in interface JobManager
uuid
- the UUID
identifying the job
JobExecutionException
public void setFailureReason(UUID uuid, Throwable failureReason) throws JobExecutionException
JobManager
setFailureReason
in interface JobManager
uuid
- the UUID
identifying the jobfailureReason
- the Throwable
that is the reason for failure
JobExecutionException
public InvocationState getInvocationState(UUID uuid)
JobManager
getInvocationState
in interface JobManager
uuid
- the UUID
identifying the job
InvocationState
public void setInvocationState(UUID uuid, InvocationState state)
JobManager
setInvocationState
in interface JobManager
uuid
- the UUID
identifying the jobstate
- the InvocationStatus
public Date getJobSubmissionTime(UUID uuid)
JobManager
getJobSubmissionTime
in interface JobManager
uuid
- the UUID
identifying the job
Date
specifying the submission timepublic void setJobSubmissionTime(UUID uuid, Date time)
JobManager
setJobSubmissionTime
in interface JobManager
uuid
- the UUID
identifying the jobtime
- the Date
when the job was submitedpublic Date getJobExecutionStartTime(UUID uuid)
JobManager
getJobExecutionStartTime
in interface JobManager
uuid
- the UUID
identifying the job
Date
that the execution of the job startedpublic void setJobExecutionStartTime(UUID uuid, Date time)
JobManager
setJobExecutionStartTime
in interface JobManager
uuid
- the UUID
identifying the jobtime
- the Date
when the job started being executedpublic Date getJobExecutionEndTime(UUID uuid)
JobManager
getJobExecutionEndTime
in interface JobManager
uuid
- the UUID
identifying the job
Date
when the execution of the job endedpublic void setJobExecutionEndTime(UUID uuid, Date time)
JobManager
setJobExecutionEndTime
in interface JobManager
uuid
- the UUID
identifying the job
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |