public class AsyncFutureImpl<V> extends Object implements Future<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.| Constructor and Description |
|---|
AsyncFutureImpl() |
AsyncFutureImpl(Throwable value) |
AsyncFutureImpl(V value) |
public AsyncFutureImpl()
public AsyncFutureImpl(V value)
public AsyncFutureImpl(Throwable value)
public boolean cancel(boolean mayInterruptIfRunning)
public boolean isCancelled()
isCancelled in interface Future<V>public V get() throws InterruptedException, ExecutionException
get in interface Future<V>InterruptedExceptionExecutionExceptionpublic V get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
get in interface Future<V>InterruptedExceptionExecutionExceptionTimeoutExceptionpublic void set(V value)
public void set(Throwable problem)
public void setAsCancelled()
Copyright © 2004-2014. All Rights Reserved.