hudson.model.queue
Class FutureImpl

java.lang.Object
  extended by hudson.remoting.AsyncFutureImpl<Queue.Executable>
      extended by hudson.model.queue.FutureImpl
All Implemented Interfaces:
QueueTaskFuture<Queue.Executable>, Future<Queue.Executable>

public final class FutureImpl
extends hudson.remoting.AsyncFutureImpl<Queue.Executable>
implements QueueTaskFuture<Queue.Executable>

Created when Queue.Item is created so that the caller can track the progress of the task.

Author:
Kohsuke Kawaguchi

Constructor Summary
FutureImpl(Queue.Task task)
           
 
Method Summary
 boolean cancel(boolean mayInterruptIfRunning)
           
 Future<Queue.Executable> getStartCondition()
          Returns a Future object that can be used to wait for the start of the task execution.
 Queue.Executable waitForStart()
          Short for getStartCondition().get()
 
Methods inherited from class hudson.remoting.AsyncFutureImpl
get, get, isCancelled, isDone, set, set, setAsCancelled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.concurrent.Future
get, get, isCancelled, isDone
 

Constructor Detail

FutureImpl

public FutureImpl(Queue.Task task)
Method Detail

getStartCondition

public Future<Queue.Executable> getStartCondition()
Description copied from interface: QueueTaskFuture
Returns a Future object that can be used to wait for the start of the task execution.

Specified by:
getStartCondition in interface QueueTaskFuture<Queue.Executable>
Returns:
never return null.

waitForStart

public final Queue.Executable waitForStart()
                                    throws InterruptedException,
                                           ExecutionException
Description copied from interface: QueueTaskFuture
Short for getStartCondition().get()

Specified by:
waitForStart in interface QueueTaskFuture<Queue.Executable>
Throws:
InterruptedException
ExecutionException

cancel

public boolean cancel(boolean mayInterruptIfRunning)
Specified by:
cancel in interface Future<Queue.Executable>
Overrides:
cancel in class hudson.remoting.AsyncFutureImpl<Queue.Executable>


Copyright © 2004-2013. All Rights Reserved.