X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=website%2Ffull_javadoc%2Fcompbio%2Fengine%2FAsyncExecutor.html;fp=website%2Ffull_javadoc%2Fcompbio%2Fengine%2FAsyncExecutor.html;h=d62bfca9e0d37cbad46d29c6f491facd8a8669e3;hb=da8c820a7fb2edecb190589f3dc9c362e57a2f24;hp=0000000000000000000000000000000000000000;hpb=0bbebf27d045b1345bc042bdf24ef2e6808df251;p=jabaws.git diff --git a/website/full_javadoc/compbio/engine/AsyncExecutor.html b/website/full_javadoc/compbio/engine/AsyncExecutor.html new file mode 100644 index 0000000..d62bfca --- /dev/null +++ b/website/full_javadoc/compbio/engine/AsyncExecutor.html @@ -0,0 +1,344 @@ + + + + + + +AsyncExecutor + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +compbio.engine +
+Interface AsyncExecutor

+
+
All Known Implementing Classes:
AsyncJobRunner, AsyncLocalRunner
+
+
+
+
public interface AsyncExecutor
+ + +

+An asynchronous executor engine, capable of running, cancelling, + obtaining results calculated by a native executable wrapper in Executable interface. + Implementation agnostic. Executables can be run either locally to the JVM or on the cluster. +

+ +

+

+
Author:
+
pvtroshin + Date October 2009
+
+
+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ booleancancelJob(String jobId) + +
+          Stop running job.
+ booleancleanup(String jobId) + +
+          Remove all files and a job directory for a jobid.
+ JobStatusgetJobStatus(String jobId) + +
+          Query the status of the job
+ ConfiguredExecutable<?>getResults(String jobId) + +
+          Retrieve the results of the job.
+ StringgetWorkDirectory(String jobId) + +
+           
+ StringsubmitJob(ConfiguredExecutable<?> executable) + +
+          Submits job for the execution + Immediate execution is not guaranteed, this method puts the job in the queue.
+  +

+ + + + + + + + +
+Method Detail
+ +

+submitJob

+
+String submitJob(ConfiguredExecutable<?> executable)
+                 throws JobSubmissionException
+
+
Submits job for the execution + Immediate execution is not guaranteed, this method puts the job in the queue. + All it guarantees that the job will be eventually executed. + The start of execution will depend on the number of jobs in the queue. +

+

+ +
Returns:
unique job identifier +
Throws: +
JobSubmissionException - if submission fails. This usually happens due to the problem on a server side.
+
+
+
+ +

+getResults

+
+ConfiguredExecutable<?> getResults(String jobId)
+                                   throws ResultNotAvailableException
+
+
Retrieve the results of the job. Please not that current implementations of this method + blocks if the task is running until the end of the calculation. +

+

+
Parameters:
jobId - job identifier obtained at the job submission +
Returns:
ConfiguredExecutable object from which result can be obtained +
Throws: +
ResultNotAvailableException - if the result is not available for whatever reason. + Could be due to execution failure, or due to the results being removed from the server at + the time of request.
+
+
+
+ +

+getWorkDirectory

+
+String getWorkDirectory(String jobId)
+
+
+
Parameters:
jobId - unique job identifier +
Returns:
task working directory
+
+
+
+ +

+cleanup

+
+boolean cleanup(String jobId)
+
+
Remove all files and a job directory for a jobid. +

+

+
Parameters:
jobId - +
Returns:
true if job directory was successfully removed, false otherwise.
+
+
+
+ +

+cancelJob

+
+boolean cancelJob(String jobId)
+
+
Stop running job. Please not that this method does not guarantee to remove the job directory and files in it. +

+

+ +
Returns:
true if job was cancelled successfully, false otherwise
+
+
+
+ +

+getJobStatus

+
+JobStatus getJobStatus(String jobId)
+
+
Query the status of the job +

+

+
Parameters:
String - jobId - unique job identifier +
Returns:
The JobStatus object representing the status of the job
See Also:
JobStatus
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + +