File D:\maven-qcr-plugin-testsunitaires\qcr4java\jenkins-master\target\site\qc\core\src\main\java\hudson\model\queue\QueueTaskFuture.java.html

1 package hudson.model.queue;
2
3 import hudson.model.Queue.Executable;
4
5 import java.util.concurrent.ExecutionException;
6 import java.util.concurrent.Future;
7
8 /**
9 * {@link Future} that can be used to wait for the start and the end of the task execution
10 * (such as a build.)
11 *
12 * <p>
13 * For a historical reason, this object itself extends from {@link Future} to signal the
14 * end of the task execution, and {@link #getStartCondition()} returns a separate
15 * {@link Future} object that waits for the start of the task.
16 *
17 * @author Kohsuke Kawaguchi
18 * @since 1.469
19 */
20 public interface QueueTaskFuture<R extends Executable> extends Future<R> {
21 /**
22 * Returns a {@link Future} object that can be used to wait for the start of the task execution.
23 *
24 * @return
25 * never return null.
26 */
27 Future<R> getStartCondition();
28
29 /**
30 * Short for {@code getStartCondition().get()}
31 */
32 R waitForStart() throws InterruptedException, ExecutionException;
33
34 }
35