source: release-kits/lirk3/resources/gs3-release-maker/ant/docs/manual/api/org/apache/tools/ant/taskdefs/Parallel.html@ 14982

Last change on this file since 14982 was 14982, checked in by oranfry, 16 years ago

initial import of LiRK3

File size: 24.9 KB
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2<!--NewPage-->
3<HTML>
4<HEAD>
5<!-- Generated by javadoc (build 1.4.2_13) on Mon Oct 01 14:33:21 NZST 2007 -->
6<TITLE>
7Parallel (Apache Ant API)
8</TITLE>
9
10<META NAME="keywords" CONTENT="org.apache.tools.ant.taskdefs.Parallel class">
11
12<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
13
14<SCRIPT type="text/javascript">
15function windowTitle()
16{
17 parent.document.title="Parallel (Apache Ant API)";
18}
19</SCRIPT>
20
21</HEAD>
22
23<BODY BGCOLOR="white" onload="windowTitle();">
24
25
26<!-- ========= START OF TOP NAVBAR ======= -->
27<A NAME="navbar_top"><!-- --></A>
28<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
29<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
30<TR>
31<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
32<A NAME="navbar_top_firstrow"><!-- --></A>
33<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
34 <TR ALIGN="center" VALIGN="top">
35 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
36 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
37 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
38 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
39 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
40 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
41 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
42 </TR>
43</TABLE>
44</TD>
45<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
46</EM>
47</TD>
48</TR>
49
50<TR>
51<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
52&nbsp;<A HREF="../../../../../org/apache/tools/ant/taskdefs/Pack.html" title="class in org.apache.tools.ant.taskdefs"><B>PREV CLASS</B></A>&nbsp;
53&nbsp;<A HREF="../../../../../org/apache/tools/ant/taskdefs/Parallel.TaskList.html" title="class in org.apache.tools.ant.taskdefs"><B>NEXT CLASS</B></A></FONT></TD>
54<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
55 <A HREF="../../../../../index.html" target="_top"><B>FRAMES</B></A> &nbsp;
56&nbsp;<A HREF="Parallel.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
57&nbsp;<SCRIPT type="text/javascript">
58 <!--
59 if(window==top) {
60 document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
61 }
62 //-->
63</SCRIPT>
64<NOSCRIPT>
65 <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
66</NOSCRIPT>
67
68</FONT></TD>
69</TR>
70<TR>
71<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
72 SUMMARY:&nbsp;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;<A HREF="#fields_inherited_from_class_org.apache.tools.ant.Task">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
73<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
74DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
75</TR>
76</TABLE>
77<A NAME="skip-navbar_top"></A>
78<!-- ========= END OF TOP NAVBAR ========= -->
79
80<HR>
81<!-- ======== START OF CLASS DATA ======== -->
82<H2>
83<FONT SIZE="-1">
84org.apache.tools.ant.taskdefs</FONT>
85<BR>
86Class Parallel</H2>
87<PRE>
88java.lang.Object
89 <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by"><A HREF="../../../../../org/apache/tools/ant/ProjectComponent.html" title="class in org.apache.tools.ant">org.apache.tools.ant.ProjectComponent</A>
90 <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by"><A HREF="../../../../../org/apache/tools/ant/Task.html" title="class in org.apache.tools.ant">org.apache.tools.ant.Task</A>
91 <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by"><B>org.apache.tools.ant.taskdefs.Parallel</B>
92</PRE>
93<DL>
94<DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../../org/apache/tools/ant/TaskContainer.html" title="interface in org.apache.tools.ant">TaskContainer</A></DD>
95</DL>
96<HR>
97<DL>
98<DT>public class <B>Parallel</B><DT>extends <A HREF="../../../../../org/apache/tools/ant/Task.html" title="class in org.apache.tools.ant">Task</A><DT>implements <A HREF="../../../../../org/apache/tools/ant/TaskContainer.html" title="interface in org.apache.tools.ant">TaskContainer</A></DL>
99
100<P>
101Executes the contained tasks in separate threads, continuing
102 once all are completed.
103 <p>
104 New behavior allows for the ant script to specify a maximum number of
105 threads that will be executed in parallel. One should be very careful about
106 using the <code>waitFor</code> task when specifying <code>threadCount</code>
107 as it can cause deadlocks if the number of threads is too small or if one of
108 the nested tasks fails to execute completely. The task selection algorithm
109 will insure that the tasks listed before a task have started before that
110 task is started, but it will not insure a successful completion of those
111 tasks or that those tasks will finish first (i.e. it's a classic race
112 condition).
113 </p>
114<P>
115
116<P>
117<DL>
118<DT><B>Since:</B></DT>
119 <DD>Ant 1.4</DD>
120</DL>
121<HR>
122
123<P>
124<!-- ======== NESTED CLASS SUMMARY ======== -->
125
126<A NAME="nested_class_summary"><!-- --></A>
127<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
128<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
129<TD COLSPAN=2><FONT SIZE="+2">
130<B>Nested Class Summary</B></FONT></TD>
131</TR>
132<TR BGCOLOR="white" CLASS="TableRowColor">
133<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
134<CODE>static&nbsp;class</CODE></FONT></TD>
135<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/Parallel.TaskList.html" title="class in org.apache.tools.ant.taskdefs">Parallel.TaskList</A></B></CODE>
136
137<BR>
138&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Class which holds a list of tasks to execute</TD>
139</TR>
140</TABLE>
141&nbsp;
142<!-- =========== FIELD SUMMARY =========== -->
143
144<A NAME="field_summary"><!-- --></A>
145<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
146<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
147<TD COLSPAN=2><FONT SIZE="+2">
148<B>Field Summary</B></FONT></TD>
149</TR>
150</TABLE>
151&nbsp;<A NAME="fields_inherited_from_class_org.apache.tools.ant.Task"><!-- --></A>
152<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
153<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
154<TD><B>Fields inherited from class org.apache.tools.ant.<A HREF="../../../../../org/apache/tools/ant/Task.html" title="class in org.apache.tools.ant">Task</A></B></TD>
155</TR>
156<TR BGCOLOR="white" CLASS="TableRowColor">
157<TD><CODE><A HREF="../../../../../org/apache/tools/ant/Task.html#description">description</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#location">location</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#target">target</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#taskName">taskName</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#taskType">taskType</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#wrapper">wrapper</A></CODE></TD>
158</TR>
159</TABLE>
160&nbsp;<A NAME="fields_inherited_from_class_org.apache.tools.ant.ProjectComponent"><!-- --></A>
161<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
162<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
163<TD><B>Fields inherited from class org.apache.tools.ant.<A HREF="../../../../../org/apache/tools/ant/ProjectComponent.html" title="class in org.apache.tools.ant">ProjectComponent</A></B></TD>
164</TR>
165<TR BGCOLOR="white" CLASS="TableRowColor">
166<TD><CODE><A HREF="../../../../../org/apache/tools/ant/ProjectComponent.html#project">project</A></CODE></TD>
167</TR>
168</TABLE>
169&nbsp;
170<!-- ======== CONSTRUCTOR SUMMARY ======== -->
171
172<A NAME="constructor_summary"><!-- --></A>
173<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
174<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
175<TD COLSPAN=2><FONT SIZE="+2">
176<B>Constructor Summary</B></FONT></TD>
177</TR>
178<TR BGCOLOR="white" CLASS="TableRowColor">
179<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/Parallel.html#Parallel()">Parallel</A></B>()</CODE>
180
181<BR>
182&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
183</TR>
184</TABLE>
185&nbsp;
186<!-- ========== METHOD SUMMARY =========== -->
187
188<A NAME="method_summary"><!-- --></A>
189<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
190<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
191<TD COLSPAN=2><FONT SIZE="+2">
192<B>Method Summary</B></FONT></TD>
193</TR>
194<TR BGCOLOR="white" CLASS="TableRowColor">
195<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
196<CODE>&nbsp;void</CODE></FONT></TD>
197<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/Parallel.html#addDaemons(org.apache.tools.ant.taskdefs.Parallel.TaskList)">addDaemons</A></B>(<A HREF="../../../../../org/apache/tools/ant/taskdefs/Parallel.TaskList.html" title="class in org.apache.tools.ant.taskdefs">Parallel.TaskList</A>&nbsp;daemonTasks)</CODE>
198
199<BR>
200&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Add a group of daemon threads</TD>
201</TR>
202<TR BGCOLOR="white" CLASS="TableRowColor">
203<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
204<CODE>&nbsp;void</CODE></FONT></TD>
205<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/Parallel.html#addTask(org.apache.tools.ant.Task)">addTask</A></B>(<A HREF="../../../../../org/apache/tools/ant/Task.html" title="class in org.apache.tools.ant">Task</A>&nbsp;nestedTask)</CODE>
206
207<BR>
208&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Add a nested task to execute in parallel.</TD>
209</TR>
210<TR BGCOLOR="white" CLASS="TableRowColor">
211<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
212<CODE>&nbsp;void</CODE></FONT></TD>
213<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/Parallel.html#execute()">execute</A></B>()</CODE>
214
215<BR>
216&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Execute the parallel tasks</TD>
217</TR>
218<TR BGCOLOR="white" CLASS="TableRowColor">
219<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
220<CODE>&nbsp;void</CODE></FONT></TD>
221<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/Parallel.html#setFailOnAny(boolean)">setFailOnAny</A></B>(boolean&nbsp;failOnAny)</CODE>
222
223<BR>
224&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Control whether a failure in a nested task halts execution.</TD>
225</TR>
226<TR BGCOLOR="white" CLASS="TableRowColor">
227<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
228<CODE>&nbsp;void</CODE></FONT></TD>
229<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/Parallel.html#setPollInterval(int)">setPollInterval</A></B>(int&nbsp;pollInterval)</CODE>
230
231<BR>
232&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Interval to poll for completed threads when threadCount or
233 threadsPerProcessor is specified.</TD>
234</TR>
235<TR BGCOLOR="white" CLASS="TableRowColor">
236<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
237<CODE>&nbsp;void</CODE></FONT></TD>
238<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/Parallel.html#setThreadCount(int)">setThreadCount</A></B>(int&nbsp;numThreads)</CODE>
239
240<BR>
241&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Statically determine the maximum number of tasks to execute
242 simultaneously.</TD>
243</TR>
244<TR BGCOLOR="white" CLASS="TableRowColor">
245<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
246<CODE>&nbsp;void</CODE></FONT></TD>
247<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/Parallel.html#setThreadsPerProcessor(int)">setThreadsPerProcessor</A></B>(int&nbsp;numThreadsPerProcessor)</CODE>
248
249<BR>
250&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dynamically generates the number of threads to execute based on the
251 number of available processors (via
252 <code>java.lang.Runtime.availableProcessors()</code>).</TD>
253</TR>
254<TR BGCOLOR="white" CLASS="TableRowColor">
255<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
256<CODE>&nbsp;void</CODE></FONT></TD>
257<TD><CODE><B><A HREF="../../../../../org/apache/tools/ant/taskdefs/Parallel.html#setTimeout(long)">setTimeout</A></B>(long&nbsp;timeout)</CODE>
258
259<BR>
260&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the timeout on this set of tasks.</TD>
261</TR>
262</TABLE>
263&nbsp;<A NAME="methods_inherited_from_class_org.apache.tools.ant.Task"><!-- --></A>
264<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
265<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
266<TD><B>Methods inherited from class org.apache.tools.ant.<A HREF="../../../../../org/apache/tools/ant/Task.html" title="class in org.apache.tools.ant">Task</A></B></TD>
267</TR>
268<TR BGCOLOR="white" CLASS="TableRowColor">
269<TD><CODE><A HREF="../../../../../org/apache/tools/ant/Task.html#getDescription()">getDescription</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#getLocation()">getLocation</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#getOwningTarget()">getOwningTarget</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#getRuntimeConfigurableWrapper()">getRuntimeConfigurableWrapper</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#getTaskName()">getTaskName</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#getTaskType()">getTaskType</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#getWrapper()">getWrapper</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#handleErrorFlush(java.lang.String)">handleErrorFlush</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#handleErrorOutput(java.lang.String)">handleErrorOutput</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#handleFlush(java.lang.String)">handleFlush</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#handleInput(byte[], int, int)">handleInput</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#handleOutput(java.lang.String)">handleOutput</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#init()">init</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#isInvalid()">isInvalid</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#log(java.lang.String)">log</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#log(java.lang.String, int)">log</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#maybeConfigure()">maybeConfigure</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#perform()">perform</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#reconfigure()">reconfigure</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#setDescription(java.lang.String)">setDescription</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#setLocation(org.apache.tools.ant.Location)">setLocation</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#setOwningTarget(org.apache.tools.ant.Target)">setOwningTarget</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#setRuntimeConfigurableWrapper(org.apache.tools.ant.RuntimeConfigurable)">setRuntimeConfigurableWrapper</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#setTaskName(java.lang.String)">setTaskName</A>, <A HREF="../../../../../org/apache/tools/ant/Task.html#setTaskType(java.lang.String)">setTaskType</A></CODE></TD>
270</TR>
271</TABLE>
272&nbsp;<A NAME="methods_inherited_from_class_org.apache.tools.ant.ProjectComponent"><!-- --></A>
273<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
274<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
275<TD><B>Methods inherited from class org.apache.tools.ant.<A HREF="../../../../../org/apache/tools/ant/ProjectComponent.html" title="class in org.apache.tools.ant">ProjectComponent</A></B></TD>
276</TR>
277<TR BGCOLOR="white" CLASS="TableRowColor">
278<TD><CODE><A HREF="../../../../../org/apache/tools/ant/ProjectComponent.html#getProject()">getProject</A>, <A HREF="../../../../../org/apache/tools/ant/ProjectComponent.html#setProject(org.apache.tools.ant.Project)">setProject</A></CODE></TD>
279</TR>
280</TABLE>
281&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
282<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
283<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
284<TD><B>Methods inherited from class java.lang.Object</B></TD>
285</TR>
286<TR BGCOLOR="white" CLASS="TableRowColor">
287<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
288</TR>
289</TABLE>
290&nbsp;
291<P>
292
293<!-- ============ FIELD DETAIL =========== -->
294
295
296<!-- ========= CONSTRUCTOR DETAIL ======== -->
297
298<A NAME="constructor_detail"><!-- --></A>
299<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
300<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
301<TD COLSPAN=1><FONT SIZE="+2">
302<B>Constructor Detail</B></FONT></TD>
303</TR>
304</TABLE>
305
306<A NAME="Parallel()"><!-- --></A><H3>
307Parallel</H3>
308<PRE>
309public <B>Parallel</B>()</PRE>
310<DL>
311</DL>
312
313<!-- ============ METHOD DETAIL ========== -->
314
315<A NAME="method_detail"><!-- --></A>
316<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
317<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
318<TD COLSPAN=1><FONT SIZE="+2">
319<B>Method Detail</B></FONT></TD>
320</TR>
321</TABLE>
322
323<A NAME="addDaemons(org.apache.tools.ant.taskdefs.Parallel.TaskList)"><!-- --></A><H3>
324addDaemons</H3>
325<PRE>
326public void <B>addDaemons</B>(<A HREF="../../../../../org/apache/tools/ant/taskdefs/Parallel.TaskList.html" title="class in org.apache.tools.ant.taskdefs">Parallel.TaskList</A>&nbsp;daemonTasks)</PRE>
327<DL>
328<DD>Add a group of daemon threads
329<P>
330<DD><DL>
331</DL>
332</DD>
333<DD><DL>
334<DT><B>Parameters:</B><DD><CODE>daemonTasks</CODE> - The tasks to be executed as daemon.</DL>
335</DD>
336</DL>
337<HR>
338
339<A NAME="setPollInterval(int)"><!-- --></A><H3>
340setPollInterval</H3>
341<PRE>
342public void <B>setPollInterval</B>(int&nbsp;pollInterval)</PRE>
343<DL>
344<DD>Interval to poll for completed threads when threadCount or
345 threadsPerProcessor is specified. Integer in milliseconds.; optional
346<P>
347<DD><DL>
348</DL>
349</DD>
350<DD><DL>
351<DT><B>Parameters:</B><DD><CODE>pollInterval</CODE> - New value of property pollInterval.</DL>
352</DD>
353</DL>
354<HR>
355
356<A NAME="setFailOnAny(boolean)"><!-- --></A><H3>
357setFailOnAny</H3>
358<PRE>
359public void <B>setFailOnAny</B>(boolean&nbsp;failOnAny)</PRE>
360<DL>
361<DD>Control whether a failure in a nested task halts execution. Note that
362 the task will complete but existing threads will continue to run - they
363 are not stopped
364<P>
365<DD><DL>
366</DL>
367</DD>
368<DD><DL>
369<DT><B>Parameters:</B><DD><CODE>failOnAny</CODE> - if true any nested task failure causes parallel to
370 complete.</DL>
371</DD>
372</DL>
373<HR>
374
375<A NAME="addTask(org.apache.tools.ant.Task)"><!-- --></A><H3>
376addTask</H3>
377<PRE>
378public void <B>addTask</B>(<A HREF="../../../../../org/apache/tools/ant/Task.html" title="class in org.apache.tools.ant">Task</A>&nbsp;nestedTask)</PRE>
379<DL>
380<DD>Add a nested task to execute in parallel.
381<P>
382<DD><DL>
383<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/tools/ant/TaskContainer.html#addTask(org.apache.tools.ant.Task)">addTask</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/tools/ant/TaskContainer.html" title="interface in org.apache.tools.ant">TaskContainer</A></CODE></DL>
384</DD>
385<DD><DL>
386<DT><B>Parameters:</B><DD><CODE>nestedTask</CODE> - Nested task to be executed in parallel</DL>
387</DD>
388</DL>
389<HR>
390
391<A NAME="setThreadsPerProcessor(int)"><!-- --></A><H3>
392setThreadsPerProcessor</H3>
393<PRE>
394public void <B>setThreadsPerProcessor</B>(int&nbsp;numThreadsPerProcessor)</PRE>
395<DL>
396<DD>Dynamically generates the number of threads to execute based on the
397 number of available processors (via
398 <code>java.lang.Runtime.availableProcessors()</code>). Requires a J2SE
399 1.4 VM, and it will overwrite the value set in threadCount.
400 If used in a 1.1, 1.2, or 1.3 VM then the task will defer to
401 <code>threadCount</code>.; optional
402<P>
403<DD><DL>
404</DL>
405</DD>
406<DD><DL>
407<DT><B>Parameters:</B><DD><CODE>numThreadsPerProcessor</CODE> - Number of threads to create per available
408 processor.</DL>
409</DD>
410</DL>
411<HR>
412
413<A NAME="setThreadCount(int)"><!-- --></A><H3>
414setThreadCount</H3>
415<PRE>
416public void <B>setThreadCount</B>(int&nbsp;numThreads)</PRE>
417<DL>
418<DD>Statically determine the maximum number of tasks to execute
419 simultaneously. If there are less tasks than threads then all will be
420 executed at once, if there are more then only <code>threadCount</code>
421 tasks will be executed at one time. If <code>threadsPerProcessor</code>
422 is set and the JVM is at least a 1.4 VM then this value is
423 ignored.; optional
424<P>
425<DD><DL>
426</DL>
427</DD>
428<DD><DL>
429<DT><B>Parameters:</B><DD><CODE>numThreads</CODE> - total number of threads.</DL>
430</DD>
431</DL>
432<HR>
433
434<A NAME="setTimeout(long)"><!-- --></A><H3>
435setTimeout</H3>
436<PRE>
437public void <B>setTimeout</B>(long&nbsp;timeout)</PRE>
438<DL>
439<DD>Sets the timeout on this set of tasks. If the timeout is reached
440 before the other threads complete, the execution of this
441 task completes with an exception.
442
443 Note that existing threads continue to run.
444<P>
445<DD><DL>
446</DL>
447</DD>
448<DD><DL>
449<DT><B>Parameters:</B><DD><CODE>timeout</CODE> - timeout in milliseconds.</DL>
450</DD>
451</DL>
452<HR>
453
454<A NAME="execute()"><!-- --></A><H3>
455execute</H3>
456<PRE>
457public void <B>execute</B>()
458 throws <A HREF="../../../../../org/apache/tools/ant/BuildException.html" title="class in org.apache.tools.ant">BuildException</A></PRE>
459<DL>
460<DD>Execute the parallel tasks
461<P>
462<DD><DL>
463<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/apache/tools/ant/Task.html#execute()">execute</A></CODE> in class <CODE><A HREF="../../../../../org/apache/tools/ant/Task.html" title="class in org.apache.tools.ant">Task</A></CODE></DL>
464</DD>
465<DD><DL>
466
467<DT><B>Throws:</B>
468<DD><CODE><A HREF="../../../../../org/apache/tools/ant/BuildException.html" title="class in org.apache.tools.ant">BuildException</A></CODE> - if any of the threads failed.</DL>
469</DD>
470</DL>
471<!-- ========= END OF CLASS DATA ========= -->
472<HR>
473
474
475<!-- ======= START OF BOTTOM NAVBAR ====== -->
476<A NAME="navbar_bottom"><!-- --></A>
477<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
478<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
479<TR>
480<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
481<A NAME="navbar_bottom_firstrow"><!-- --></A>
482<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
483 <TR ALIGN="center" VALIGN="top">
484 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
485 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
486 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
487 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
488 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
489 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
490 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
491 </TR>
492</TABLE>
493</TD>
494<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
495</EM>
496</TD>
497</TR>
498
499<TR>
500<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
501&nbsp;<A HREF="../../../../../org/apache/tools/ant/taskdefs/Pack.html" title="class in org.apache.tools.ant.taskdefs"><B>PREV CLASS</B></A>&nbsp;
502&nbsp;<A HREF="../../../../../org/apache/tools/ant/taskdefs/Parallel.TaskList.html" title="class in org.apache.tools.ant.taskdefs"><B>NEXT CLASS</B></A></FONT></TD>
503<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
504 <A HREF="../../../../../index.html" target="_top"><B>FRAMES</B></A> &nbsp;
505&nbsp;<A HREF="Parallel.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
506&nbsp;<SCRIPT type="text/javascript">
507 <!--
508 if(window==top) {
509 document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
510 }
511 //-->
512</SCRIPT>
513<NOSCRIPT>
514 <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
515</NOSCRIPT>
516
517</FONT></TD>
518</TR>
519<TR>
520<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
521 SUMMARY:&nbsp;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;<A HREF="#fields_inherited_from_class_org.apache.tools.ant.Task">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
522<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
523DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
524</TR>
525</TABLE>
526<A NAME="skip-navbar_bottom"></A>
527<!-- ======== END OF BOTTOM NAVBAR ======= -->
528
529<HR>
530Copyright © 2000-2007 Apache Software Foundation. All Rights Reserved.
531</BODY>
532</HTML>
Note: See TracBrowser for help on using the repository browser.