uk.ac.ncl.cs.instantsoap.job
Interface JobManager

All Known Implementing Classes:
JobManagerImpl

public interface JobManager

Manage jobs, their statuses and data associated with them.

Author:
Louis, Matthew Pocock

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 status)
          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.
 

Method Detail

newJob

UUID newJob()
Create a new Job and return the corresponding UUID.

Returns:
the UUID of the new job

isFailure

boolean isFailure(UUID uuid)
Return true if the job associated with the uuid has failed.

Parameters:
uuid - the UUID of the job to check
Returns:
the failure status of the job

setFailure

void setFailure(UUID uuid,
                boolean failure)
Update the failure status of the job with the id.

Parameters:
uuid - the UUID identifying the job
failure - the new failure status of the job

setResult

void setResult(UUID uuid,
               Map<String,String> result)
               throws JobExecutionException
Set the results of the job associated with the id.

Parameters:
uuid - the UUID identifying the job
result - the Map containing the results
Throws:
JobExecutionException

getResult

Map<String,String> getResult(UUID uuid)
                             throws JobExecutionException
Get the results of the job associated with the id.

Parameters:
uuid - the UUID identifying the job
Returns:
the Map of results
Throws:
JobExecutionException

setFailureReason

void setFailureReason(UUID uuid,
                      Throwable failureReason)
                      throws JobExecutionException
Set the reason for failure for the job associated with the id.

Parameters:
uuid - the UUID identifying the job
failureReason - the Throwable that is the reason for failure
Throws:
JobExecutionException

getFailureReason

Throwable getFailureReason(UUID uuid)
                           throws JobExecutionException
Get the reason for failure for the job associated with the id.

Parameters:
uuid - the UUID identifying the job
Returns:
the reason for failure
Throws:
JobExecutionException

getInvocationState

InvocationState getInvocationState(UUID uuid)
Get the invocation state associated with the id.

Parameters:
uuid - the UUID identifying the job
Returns:
the InvocationState

setInvocationState

void setInvocationState(UUID uuid,
                        InvocationState status)
Set the invocation state associated with the id.

Parameters:
uuid - the UUID identifying the job
status - the InvocationStatus

getJobSubmissionTime

Date getJobSubmissionTime(UUID uuid)
Get the submission time for the job associated with the id.

Parameters:
uuid - the UUID identifying the job
Returns:
the Date specifying the submission time

setJobSubmissionTime

void setJobSubmissionTime(UUID uuid,
                          Date time)
Set the submission time for the job associated with the id.

Parameters:
uuid - the UUID identifying the job
time - the Date when the job was submited

getJobExecutionStartTime

Date getJobExecutionStartTime(UUID uuid)
Get the submission time for the job associated with the id.

Parameters:
uuid - the UUID identifying the job
Returns:
the Date that the execution of the job started

setJobExecutionStartTime

void setJobExecutionStartTime(UUID uuid,
                              Date time)
Set the submission time for the job associated with the id.

Parameters:
uuid - the UUID identifying the job
time - the Date when the job started being executed

getJobExecutionEndTime

Date getJobExecutionEndTime(UUID uuid)
Get the execution end time for the job associated with the id.

Parameters:
uuid - the UUID identifying the job
Returns:
the Date when the execution of the job ended

setJobExecutionEndTime

void setJobExecutionEndTime(UUID uuid,
                            Date time)
Set the execution end time for the job associated with the id.

Parameters:
uuid - the UUID identifying the job
tiem - the Date when the execution of the job ended


Copyright © 2006-2008. All Rights Reserved.