public class BasicFuture<V>
extends java.lang.Object
implements java.util.concurrent.Future<V>
Constructor and Description |
---|
BasicFuture() |
Modifier and Type | Method and Description |
---|---|
boolean |
cancel(boolean value) |
void |
complete(java.lang.RuntimeException exn) |
void |
complete(V value) |
V |
get() |
V |
get(long timeout,
java.util.concurrent.TimeUnit unit) |
boolean |
isCancelled() |
boolean |
isDone() |
public boolean isDone()
isDone
in interface java.util.concurrent.Future<V>
public V get() throws java.lang.InterruptedException, java.util.concurrent.ExecutionException
get
in interface java.util.concurrent.Future<V>
java.lang.InterruptedException
java.util.concurrent.ExecutionException
public V get(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException, java.util.concurrent.TimeoutException
get
in interface java.util.concurrent.Future<V>
java.lang.InterruptedException
java.util.concurrent.ExecutionException
java.util.concurrent.TimeoutException
public void complete(V value)
public void complete(java.lang.RuntimeException exn)
public boolean cancel(boolean value)
cancel
in interface java.util.concurrent.Future<V>
public boolean isCancelled()
isCancelled
in interface java.util.concurrent.Future<V>