| Constructor and Description | 
|---|
SlotFuture()
Creates a SlotFuture. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
boolean | 
cancel(boolean mayInterruptIfRunning) | 
void | 
fail(Throwable throwable)
Writes a throwable into the slot, indicating that the task has failed. 
 | 
V | 
get()  | 
V | 
get(long timeout,
   TimeUnit unit)  | 
boolean | 
isCancelled()  | 
boolean | 
isDone()  | 
void | 
put(V value)
Writes a value into the slot, indicating that the task has completed
 successfully. 
 | 
String | 
toString()  | 
public boolean cancel(boolean mayInterruptIfRunning)
The SlotFuture does not know which thread is computing the result
 and therefore the mayInterruptIfRunning parameter is ignored.
public boolean isCancelled()
isCancelled in interface Future<V>public V get() throws ExecutionException, InterruptedException
get in interface Future<V>ExecutionExceptionInterruptedExceptionpublic V get(long timeout, TimeUnit unit) throws ExecutionException, InterruptedException, TimeoutException
get in interface Future<V>ExecutionExceptionInterruptedExceptionTimeoutExceptionpublic void put(V value)
value - Value to yield as the result of the computationIllegalArgumentException - if put, fail or cancel has already
     been invoked on this futurepublic void fail(Throwable throwable)
throwable - Exception that aborted the computationIllegalArgumentException - if put, fail or cancel has already
     been invoked on this future