1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
\r
5 <!-- Generated by javadoc (build 1.6.0_14) on Wed Feb 17 16:46:49 GMT 2010 -->
\r
10 <META NAME="date" CONTENT="2010-02-17">
\r
12 <LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">
\r
14 <SCRIPT type="text/javascript">
\r
15 function windowTitle()
\r
17 if (location.href.indexOf('is-external=true') == -1) {
\r
18 parent.document.title="AsyncExecutor";
\r
27 <BODY BGCOLOR="white" onload="windowTitle();">
\r
31 <!-- ========= START OF TOP NAVBAR ======= -->
\r
32 <A NAME="navbar_top"><!-- --></A>
\r
33 <A HREF="#skip-navbar_top" title="Skip navigation links"></A>
\r
34 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
\r
36 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
\r
37 <A NAME="navbar_top_firstrow"><!-- --></A>
\r
38 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
\r
39 <TR ALIGN="center" VALIGN="top">
\r
40 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
\r
41 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
\r
42 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
\r
43 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/AsyncExecutor.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
\r
44 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
\r
45 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
\r
46 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
\r
47 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
\r
51 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
\r
57 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
\r
58 PREV CLASS
\r
59 <A HREF="../../compbio/engine/Cleaner.html" title="class in compbio.engine"><B>NEXT CLASS</B></A></FONT></TD>
\r
60 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
\r
61 <A HREF="../../index.html?compbio/engine/AsyncExecutor.html" target="_top"><B>FRAMES</B></A>
\r
62 <A HREF="AsyncExecutor.html" target="_top"><B>NO FRAMES</B></A>
\r
63 <SCRIPT type="text/javascript">
\r
66 document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
\r
71 <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
\r
78 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
\r
79 SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
\r
80 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
\r
81 DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
\r
84 <A NAME="skip-navbar_top"></A>
\r
85 <!-- ========= END OF TOP NAVBAR ========= -->
\r
88 <!-- ======== START OF CLASS DATA ======== -->
\r
91 compbio.engine</FONT>
\r
93 Interface AsyncExecutor</H2>
\r
95 <DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../compbio/engine/cluster/drmaa/AsyncJobRunner.html" title="class in compbio.engine.cluster.drmaa">AsyncJobRunner</A>, <A HREF="../../compbio/engine/local/AsyncLocalRunner.html" title="class in compbio.engine.local">AsyncLocalRunner</A></DD>
\r
99 <DT><PRE>public interface <B>AsyncExecutor</B></DL>
\r
103 An asynchronous executor engine, capable of running, cancelling,
104 obtaining results calculated by a native executable wrapper in Executable interface.
105 Implementation agnostic. Executables can be run either locally to the JVM or on the cluster.
\r
110 <DT><B>Author:</B></DT>
\r
112 Date October 2009</DD>
\r
118 <!-- ========== METHOD SUMMARY =========== -->
\r
120 <A NAME="method_summary"><!-- --></A>
\r
121 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
\r
122 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
\r
123 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
\r
124 <B>Method Summary</B></FONT></TH>
\r
126 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
127 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
128 <CODE> boolean</CODE></FONT></TD>
\r
129 <TD><CODE><B><A HREF="../../compbio/engine/AsyncExecutor.html#cancelJob(java.lang.String)">cancelJob</A></B>(java.lang.String jobId)</CODE>
\r
132 Stop running job.</TD>
\r
134 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
135 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
136 <CODE> boolean</CODE></FONT></TD>
\r
137 <TD><CODE><B><A HREF="../../compbio/engine/AsyncExecutor.html#cleanup(java.lang.String)">cleanup</A></B>(java.lang.String jobId)</CODE>
\r
140 Remove all files and a job directory for a jobid.</TD>
\r
142 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
143 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
144 <CODE> <A HREF="../../compbio/metadata/JobStatus.html" title="enum in compbio.metadata">JobStatus</A></CODE></FONT></TD>
\r
145 <TD><CODE><B><A HREF="../../compbio/engine/AsyncExecutor.html#getJobStatus(java.lang.String)">getJobStatus</A></B>(java.lang.String jobId)</CODE>
\r
148 Query the status of the job</TD>
\r
150 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
151 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
152 <CODE> <A HREF="../../compbio/engine/client/ConfiguredExecutable.html" title="interface in compbio.engine.client">ConfiguredExecutable</A><?></CODE></FONT></TD>
\r
153 <TD><CODE><B><A HREF="../../compbio/engine/AsyncExecutor.html#getResults(java.lang.String)">getResults</A></B>(java.lang.String jobId)</CODE>
\r
156 Retrieve the results of the job.</TD>
\r
158 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
159 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
160 <CODE> java.lang.String</CODE></FONT></TD>
\r
161 <TD><CODE><B><A HREF="../../compbio/engine/AsyncExecutor.html#getWorkDirectory(java.lang.String)">getWorkDirectory</A></B>(java.lang.String jobId)</CODE>
\r
164 </TD>
\r
166 <TR BGCOLOR="white" CLASS="TableRowColor">
\r
167 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
\r
168 <CODE> java.lang.String</CODE></FONT></TD>
\r
169 <TD><CODE><B><A HREF="../../compbio/engine/AsyncExecutor.html#submitJob(compbio.engine.client.ConfiguredExecutable)">submitJob</A></B>(<A HREF="../../compbio/engine/client/ConfiguredExecutable.html" title="interface in compbio.engine.client">ConfiguredExecutable</A><?> executable)</CODE>
\r
172 Submits job for the execution
173 Immediate execution is not guaranteed, this method puts the job in the queue.</TD>
\r
179 <!-- ============ METHOD DETAIL ========== -->
\r
181 <A NAME="method_detail"><!-- --></A>
\r
182 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
\r
183 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
\r
184 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
\r
185 <B>Method Detail</B></FONT></TH>
\r
189 <A NAME="submitJob(compbio.engine.client.ConfiguredExecutable)"><!-- --></A><H3>
\r
192 java.lang.String <B>submitJob</B>(<A HREF="../../compbio/engine/client/ConfiguredExecutable.html" title="interface in compbio.engine.client">ConfiguredExecutable</A><?> executable)
\r
193 throws <A HREF="../../compbio/metadata/JobSubmissionException.html" title="class in compbio.metadata">JobSubmissionException</A></PRE>
\r
195 <DD>Submits job for the execution
196 Immediate execution is not guaranteed, this method puts the job in the queue.
197 All it guarantees that the job will be eventually executed.
198 The start of execution will depend on the number of jobs in the queue.
\r
202 <DT><B>Returns:</B><DD>unique job identifier
\r
204 <DD><CODE><A HREF="../../compbio/metadata/JobSubmissionException.html" title="class in compbio.metadata">JobSubmissionException</A></CODE> - if submission fails. This usually happens due to the problem on a server side.</DL>
\r
209 <A NAME="getResults(java.lang.String)"><!-- --></A><H3>
\r
212 <A HREF="../../compbio/engine/client/ConfiguredExecutable.html" title="interface in compbio.engine.client">ConfiguredExecutable</A><?> <B>getResults</B>(java.lang.String jobId)
\r
213 throws <A HREF="../../compbio/metadata/ResultNotAvailableException.html" title="class in compbio.metadata">ResultNotAvailableException</A></PRE>
\r
215 <DD>Retrieve the results of the job. Please not that current implementations of this method
216 blocks if the task is running until the end of the calculation.
\r
219 <DT><B>Parameters:</B><DD><CODE>jobId</CODE> - job identifier obtained at the job submission
\r
220 <DT><B>Returns:</B><DD>ConfiguredExecutable object from which result can be obtained
\r
222 <DD><CODE><A HREF="../../compbio/metadata/ResultNotAvailableException.html" title="class in compbio.metadata">ResultNotAvailableException</A></CODE> - if the result is not available for whatever reason.
223 Could be due to execution failure, or due to the results being removed from the server at
224 the time of request.</DL>
\r
229 <A NAME="getWorkDirectory(java.lang.String)"><!-- --></A><H3>
\r
230 getWorkDirectory</H3>
\r
232 java.lang.String <B>getWorkDirectory</B>(java.lang.String jobId)</PRE>
\r
235 <DT><B>Parameters:</B><DD><CODE>jobId</CODE> - unique job identifier
\r
236 <DT><B>Returns:</B><DD>task working directory</DL>
\r
241 <A NAME="cleanup(java.lang.String)"><!-- --></A><H3>
\r
244 boolean <B>cleanup</B>(java.lang.String jobId)</PRE>
\r
246 <DD>Remove all files and a job directory for a jobid.
\r
249 <DT><B>Parameters:</B><DD><CODE>jobId</CODE> -
\r
250 <DT><B>Returns:</B><DD>true if job directory was successfully removed, false otherwise.</DL>
\r
255 <A NAME="cancelJob(java.lang.String)"><!-- --></A><H3>
\r
258 boolean <B>cancelJob</B>(java.lang.String jobId)</PRE>
\r
260 <DD>Stop running job. Please not that this method does not guarantee to remove the job directory and files in it.
\r
264 <DT><B>Returns:</B><DD>true if job was cancelled successfully, false otherwise</DL>
\r
269 <A NAME="getJobStatus(java.lang.String)"><!-- --></A><H3>
\r
272 <A HREF="../../compbio/metadata/JobStatus.html" title="enum in compbio.metadata">JobStatus</A> <B>getJobStatus</B>(java.lang.String jobId)</PRE>
\r
274 <DD>Query the status of the job
\r
277 <DT><B>Parameters:</B><DD><CODE>String</CODE> - jobId - unique job identifier
\r
278 <DT><B>Returns:</B><DD>The JobStatus object representing the status of the job<DT><B>See Also:</B><DD><A HREF="../../compbio/metadata/JobStatus.html" title="enum in compbio.metadata"><CODE>JobStatus</CODE></A></DL>
\r
281 <!-- ========= END OF CLASS DATA ========= -->
\r
285 <!-- ======= START OF BOTTOM NAVBAR ====== -->
\r
286 <A NAME="navbar_bottom"><!-- --></A>
\r
287 <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
\r
288 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
\r
290 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
\r
291 <A NAME="navbar_bottom_firstrow"><!-- --></A>
\r
292 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
\r
293 <TR ALIGN="center" VALIGN="top">
\r
294 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
\r
295 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
\r
296 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
\r
297 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/AsyncExecutor.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
\r
298 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
\r
299 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
\r
300 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
\r
301 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
\r
305 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
\r
311 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
\r
312 PREV CLASS
\r
313 <A HREF="../../compbio/engine/Cleaner.html" title="class in compbio.engine"><B>NEXT CLASS</B></A></FONT></TD>
\r
314 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
\r
315 <A HREF="../../index.html?compbio/engine/AsyncExecutor.html" target="_top"><B>FRAMES</B></A>
\r
316 <A HREF="AsyncExecutor.html" target="_top"><B>NO FRAMES</B></A>
\r
317 <SCRIPT type="text/javascript">
\r
320 document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
\r
325 <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
\r
332 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
\r
333 SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
\r
334 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
\r
335 DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
\r
338 <A NAME="skip-navbar_bottom"></A>
\r
339 <!-- ======== END OF BOTTOM NAVBAR ======= -->
\r