Package hudson.remoting
Class AsyncFutureImpl<V>
java.lang.Object
hudson.remoting.AsyncFutureImpl<V>
Future
implementation whose computation is carried out elsewhere.
Call the set(Object)
method or set(Throwable)
method to set the value to the future.- Author:
- Kohsuke Kawaguchi
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
AsyncFutureImpl
public AsyncFutureImpl() -
AsyncFutureImpl
-
AsyncFutureImpl
-
-
Method Details
-
cancel
public boolean cancel(boolean mayInterruptIfRunning) -
isCancelled
public boolean isCancelled()- Specified by:
isCancelled
in interfaceFuture<V>
-
isDone
public boolean isDone() -
get
- Specified by:
get
in interfaceFuture<V>
- Throws:
InterruptedException
ExecutionException
-
get
@CheckForNull public V get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException - Specified by:
get
in interfaceFuture<V>
- Throws:
InterruptedException
ExecutionException
TimeoutException
-
set
-
set
-
setAsCancelled
public void setAsCancelled()Marks this task as cancelled.
-