Package hudson.model.queue
Class FutureImpl
- java.lang.Object
-
- hudson.remoting.AsyncFutureImpl<Queue.Executable>
-
- hudson.model.queue.FutureImpl
-
- All Implemented Interfaces:
QueueTaskFuture<Queue.Executable>
,hudson.remoting.Future<Queue.Executable>
,Future<Queue.Executable>
public final class FutureImpl extends hudson.remoting.AsyncFutureImpl<Queue.Executable> implements QueueTaskFuture<Queue.Executable>
Created whenQueue.Item
is created so that the caller can track the progress of the task.- Author:
- Kohsuke Kawaguchi
-
-
Constructor Summary
Constructors Constructor Description FutureImpl(Queue.Task task)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
cancel(boolean mayInterruptIfRunning)
Future<Queue.Executable>
getStartCondition()
Returns aFuture
object that can be used to wait for the start of the task execution.void
setAsCancelled()
Queue.Executable
waitForStart()
Short forgetStartCondition().get()
-
Methods inherited from class hudson.remoting.AsyncFutureImpl
get, get, isCancelled, isDone, set, set
-
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 aFuture
object that can be used to wait for the start of the task execution.- Specified by:
getStartCondition
in interfaceQueueTaskFuture<Queue.Executable>
- Returns:
- never return null.
-
waitForStart
public Queue.Executable waitForStart() throws InterruptedException, ExecutionException
Description copied from interface:QueueTaskFuture
Short forgetStartCondition().get()
- Specified by:
waitForStart
in interfaceQueueTaskFuture<Queue.Executable>
- Throws:
InterruptedException
ExecutionException
-
cancel
public boolean cancel(boolean mayInterruptIfRunning)
- Specified by:
cancel
in interfaceFuture<Queue.Executable>
- Overrides:
cancel
in classhudson.remoting.AsyncFutureImpl<Queue.Executable>
-
setAsCancelled
public void setAsCancelled()
- Overrides:
setAsCancelled
in classhudson.remoting.AsyncFutureImpl<Queue.Executable>
-
-